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 | 2 ++ include/linux/user_namespace.h | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/include/linux/fs.h b/include/linux/fs.h index fb5accebdcdf..b4e8289ae361 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -43,6 +43,7 @@ #include <linux/cred.h> #include <linux/mnt_idmapping.h> #include <linux/slab.h> +#include <linux/kabi.h>
#include <asm/byteorder.h> #include <uapi/linux/fs.h> @@ -1027,6 +1028,7 @@ struct file { struct address_space *f_mapping; errseq_t f_wb_err; errseq_t f_sb_err; /* for syncfs */ + KABI_RESERVE(0); } __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..e3d858bdd962 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,7 @@ struct user_namespace { struct ucounts *ucounts; long ucount_max[UCOUNT_COUNTS]; long rlimit_max[UCOUNT_RLIMIT_COUNTS]; + KABI_RESERVE(0); } __randomize_layout;
struct ucounts {