summaryrefslogtreecommitdiff
path: root/security/apparmor/include/policy.h
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2022-03-26 01:46:18 -0700
committerJohn Johansen <john.johansen@canonical.com>2022-07-19 02:55:45 -0700
commitc1ed5da197652318341fd36333d45e8e6d5c3359 (patch)
tree683644f81fe3f38082ddc519a8d7d798e183ab70 /security/apparmor/include/policy.h
parent2504db207146543736e877241f3b3de005cbe056 (diff)
downloadlinux-c1ed5da197652318341fd36333d45e8e6d5c3359.tar.gz
linux-c1ed5da197652318341fd36333d45e8e6d5c3359.tar.bz2
linux-c1ed5da197652318341fd36333d45e8e6d5c3359.zip
apparmor: allow label to carry debug flags
Allow labels to have debug flags that can be used to trigger debug output only from profiles/labels that are marked. This can help reduce debug output by allowing debug to be target to a specific confinement condition. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/policy.h')
-rw-r--r--security/apparmor/include/policy.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h
index 232d3d9566eb..639b5b248e63 100644
--- a/security/apparmor/include/policy.h
+++ b/security/apparmor/include/policy.h
@@ -48,6 +48,10 @@ extern const char *const aa_profile_mode_names[];
#define PROFILE_IS_HAT(_profile) ((_profile)->label.flags & FLAG_HAT)
+#define CHECK_DEBUG1(_profile) ((_profile)->label.flags & FLAG_DEBUG1)
+
+#define CHECK_DEBUG2(_profile) ((_profile)->label.flags & FLAG_DEBUG2)
+
#define profile_is_stale(_profile) (label_is_stale(&(_profile)->label))
#define on_list_rcu(X) (!list_empty(X) && (X)->prev != LIST_POISON2)