From: Felix Fu fuzhen5@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8SWXZ
--------------------------------
KABI reservation for LSM framework.
Signed-off-by: Felix Fu fuzhen5@huawei.com --- include/linux/lsm_audit.h | 2 ++ include/linux/lsm_hooks.h | 4 ++++ include/linux/security.h | 1 + 3 files changed, 7 insertions(+)
diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h index 97a8b21eb033..ea87eea2d3e1 100644 --- a/include/linux/lsm_audit.h +++ b/include/linux/lsm_audit.h @@ -10,6 +10,7 @@ */ #ifndef _LSM_COMMON_LOGGING_ #define _LSM_COMMON_LOGGING_ +#include <linux/kabi.h>
#include <linux/stddef.h> #include <linux/errno.h> @@ -111,6 +112,7 @@ struct common_audit_data { struct apparmor_audit_data *apparmor_audit_data; #endif }; /* per LSM data pointer union */ + KABI_RESERVE(0); };
#define v4info fam.v4 diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h index dcb5e5b5eb13..92155dd5c028 100644 --- a/include/linux/lsm_hooks.h +++ b/include/linux/lsm_hooks.h @@ -29,6 +29,7 @@ #include <linux/init.h> #include <linux/rculist.h> #include <linux/xattr.h> +#include <linux/kabi.h>
union security_list_options { #define LSM_HOOK(RET, DEFAULT, NAME, ...) RET (*NAME)(__VA_ARGS__); @@ -65,6 +66,8 @@ struct lsm_blob_sizes { int lbs_msg_msg; int lbs_task; int lbs_xattr_count; /* number of xattr slots in new_xattrs array */ + KABI_RESERVE(0); + KABI_RESERVE(1); };
/** @@ -113,6 +116,7 @@ enum lsm_order { LSM_ORDER_FIRST = -1, /* This is only for capabilities. */ LSM_ORDER_MUTABLE = 0, LSM_ORDER_LAST = 1, /* This is only for integrity. */ + KABI_RESERVE0, };
struct lsm_info { diff --git a/include/linux/security.h b/include/linux/security.h index 5f16eecde00b..634179fbc35e 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -135,6 +135,7 @@ enum lockdown_reason { LOCKDOWN_XMON_RW, LOCKDOWN_XFRM_SECRET, LOCKDOWN_CONFIDENTIALITY_MAX, + KABI_RESERVE0, };
extern const char *const lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1];