summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2022-07-16 03:29:19 -0700
committerJohn Johansen <john.johansen@canonical.com>2022-10-03 14:49:03 -0700
commitae6d35ed0a481824a8730c39d5b319c8a76ea00e (patch)
tree920f39dc7574d2336cfdc0f00f948fd8122845fe /security/apparmor/include
parentb06a62ebf5a3f041b22def1608f1a8ab9bbfa951 (diff)
downloadlinux-ae6d35ed0a481824a8730c39d5b319c8a76ea00e.tar.bz2
apparmor: extend xindex size
Allow the xindex to have 2^24 entries. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include')
-rw-r--r--security/apparmor/include/file.h23
-rw-r--r--security/apparmor/include/perms.h2
2 files changed, 12 insertions, 13 deletions
diff --git a/security/apparmor/include/file.h b/security/apparmor/include/file.h
index 4212426020cb..521c8568f6d4 100644
--- a/security/apparmor/include/file.h
+++ b/security/apparmor/include/file.h
@@ -88,18 +88,17 @@ static inline struct aa_label *aa_get_file_label(struct aa_file_ctx *ctx)
* - exec type - which determines how the executable name and index are used
* - flags - which modify how the destination name is applied
*/
-#define AA_X_INDEX_MASK 0x03ff
-
-#define AA_X_TYPE_MASK 0x0c00
-#define AA_X_TYPE_SHIFT 10
-#define AA_X_NONE 0x0000
-#define AA_X_NAME 0x0400 /* use executable name px */
-#define AA_X_TABLE 0x0800 /* use a specified name ->n# */
-
-#define AA_X_UNSAFE 0x1000
-#define AA_X_CHILD 0x2000 /* make >AA_X_NONE apply to children */
-#define AA_X_INHERIT 0x4000
-#define AA_X_UNCONFINED 0x8000
+#define AA_X_INDEX_MASK 0x00ffffff
+
+#define AA_X_TYPE_MASK 0x0c000000
+#define AA_X_NONE 0x00000000
+#define AA_X_NAME 0x04000000 /* use executable name px */
+#define AA_X_TABLE 0x08000000 /* use a specified name ->n# */
+
+#define AA_X_UNSAFE 0x10000000
+#define AA_X_CHILD 0x20000000
+#define AA_X_INHERIT 0x40000000
+#define AA_X_UNCONFINED 0x80000000
/* need to make conditional which ones are being set */
struct path_cond {
diff --git a/security/apparmor/include/perms.h b/security/apparmor/include/perms.h
index 1014a7bbc027..8739cef73549 100644
--- a/security/apparmor/include/perms.h
+++ b/security/apparmor/include/perms.h
@@ -78,7 +78,7 @@ struct aa_perms {
u32 quiet; /* set only when ~allow | deny */
u32 hide; /* set only when ~allow | deny */
- u16 xindex;
+ u32 xindex;
};
#define ALL_PERMS_MASK 0xffffffff