hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8RI9L
--------------------------------
KABI reservation for IMA and related modules.
Signed-off-by: GUO Zihua guozihua@huawei.com --- include/linux/fs.h | 3 +++ include/linux/user_namespace.h | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/include/linux/fs.h b/include/linux/fs.h index cc34619424cf..897ee73acb91 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -44,6 +44,7 @@ #include <linux/mnt_idmapping.h> #include <linux/slab.h> #include <linux/tracepoint-defs.h> +#include <linux/kabi.h>
#include <asm/byteorder.h> #include <uapi/linux/fs.h> @@ -1038,6 +1039,8 @@ struct file { errseq_t f_wb_err; errseq_t f_sb_err; /* for syncfs */ fmode_t f_ctl_mode; + KABI_RESERVE(1); + KABI_RESERVE(2); } __randomize_layout __attribute__((aligned(4))); /* lest something weird decides that 2 is OK */
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 45f09bec02c4..71ce00e85c29 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -10,6 +10,7 @@ #include <linux/rwsem.h> #include <linux/sysctl.h> #include <linux/err.h> +#include <linux/kabi.h>
#define UID_GID_MAP_MAX_BASE_EXTENTS 5 #define UID_GID_MAP_MAX_EXTENTS 340 @@ -102,6 +103,8 @@ struct user_namespace { struct ucounts *ucounts; long ucount_max[UCOUNT_COUNTS]; long rlimit_max[UCOUNT_RLIMIT_COUNTS]; + KABI_RESERVE(1); + KABI_RESERVE(2); } __randomize_layout;
struct ucounts {