提交 88f4e81b 编写于 作者: Y Yury Norov 提交者: Chen Jun

arm64: introduce AUDIT_ARCH_AARCH64ILP32 for ilp32

maillist inclusion
category: feature
bugzilla: 46790
CVE: NA

Reference: https://github.com/norov/linux/commits/ilp32-5.2

--------------------------------

syscall_get_arch() currently makes no difference between arm64 and
arm64/ilp32. Fix it by adding AUDIT_ARCH_AARCH64ILP32.
Reported-by: NAndy Lutomirski <luto@amacapital.net>
Signed-off-by: NYury Norov <ynorov@marvell.com>
Signed-off-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
上级 8a3f8f5e
...@@ -91,6 +91,9 @@ static inline int syscall_get_arch(struct task_struct *task) ...@@ -91,6 +91,9 @@ static inline int syscall_get_arch(struct task_struct *task)
if (is_a32_compat_thread(task_thread_info(task))) if (is_a32_compat_thread(task_thread_info(task)))
return AUDIT_ARCH_ARM; return AUDIT_ARCH_ARM;
else if (is_ilp32_compat_task())
return AUDIT_ARCH_AARCH64ILP32;
return AUDIT_ARCH_AARCH64; return AUDIT_ARCH_AARCH64;
} }
......
...@@ -381,6 +381,7 @@ enum { ...@@ -381,6 +381,7 @@ enum {
#define __AUDIT_ARCH_LE 0x40000000 #define __AUDIT_ARCH_LE 0x40000000
#define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_AARCH64ILP32 (EM_AARCH64|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ARCOMPACT (EM_ARCOMPACT|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ARCOMPACT (EM_ARCOMPACT|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ARCOMPACTBE (EM_ARCOMPACT) #define AUDIT_ARCH_ARCOMPACTBE (EM_ARCOMPACT)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册