summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include
diff options
context:
space:
mode:
authorMike Salvatore <mike.salvatore@canonical.com>2020-05-31 10:52:06 -0400
committerJohn Johansen <john.johansen@canonical.com>2022-10-03 14:49:02 -0700
commitb5b57993504f91785fa70e002e5e494fb549726e (patch)
tree3d3a6cc40d0949486554351e6889ed5fc594fb98 /security/apparmor/include
parent408d53e923bd852d5d80243a642004163db53a87 (diff)
downloadlinux-b5b57993504f91785fa70e002e5e494fb549726e.tar.bz2
apparmor: compute xmatch permissions on profile load
Rather than computing xmatch permissions each time access is requested, these permissions can be computed once on profile load and stored for lookup. Signed-off-by: Mike Salvatore <mike.salvatore@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include')
-rw-r--r--security/apparmor/include/policy.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h
index 639b5b248e63..128c6a9430d4 100644
--- a/security/apparmor/include/policy.h
+++ b/security/apparmor/include/policy.h
@@ -104,6 +104,7 @@ struct aa_data {
* @attach: human readable attachment string
* @xmatch: optional extended matching for unconfined executables names
* @xmatch_len: xmatch prefix len, used to determine xmatch priority
+ * @xmatch_perms: precomputed permissions for the xmatch DFA indexed by state
* @audit: the auditing mode of the profile
* @mode: the enforcement mode of the profile
* @path_flags: flags controlling path generation behavior
@@ -140,6 +141,7 @@ struct aa_profile {
const char *attach;
struct aa_dfa *xmatch;
unsigned int xmatch_len;
+ u32 *xmatch_perms;
enum audit_mode audit;
long mode;
u32 path_flags;