hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IAZ996 CVE: NA
----------------------------------------------------------------------
Since struct audit_context and linux_binprm contains hole at the end, we can directly add one list without breaking KABI.
Signed-off-by: Gu Bowen gubowen5@huawei.com --- include/linux/binfmts.h | 12 ++++++------ kernel/audit.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 330b194b66e7..79b8a70a1b37 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h @@ -42,12 +42,12 @@ struct linux_binprm { * Set when errors can no longer be returned to the * original userspace. */ - point_of_no_return:1, - /* - * Set by user space to check executability according to the - * caller's environment. - */ - is_check:1; + point_of_no_return:1; + /* + * Set by user space to check executability according to the + * caller's environment. + */ + KABI_FILL_HOLE(unsigned int is_check:1); struct file *executable; /* Executable to pass to the interpreter */ struct file *interpreter; struct file *file; diff --git a/kernel/audit.h b/kernel/audit.h index ab718ac899a2..dac0f0804c39 100644 --- a/kernel/audit.h +++ b/kernel/audit.h @@ -198,7 +198,7 @@ struct audit_context { struct open_how openat2; struct { int argc; - bool is_check; + KABI_FILL_HOLE(bool is_check); } execve; struct { char *name;