提交 d4ecb569 编写于 作者: C Chen Jiahao 提交者: Zheng Zengkai

arm64: fix AUDIT_ARCH_AARCH64ILP32 bug on audit subsystem

hulk inclusion
category: bugfix
bugzilla: 174525 https://gitee.com/openeuler/kernel/issues/I4DDEL

--------

In arm64be_ilp32 platform, audit could not record log in some case, because
syscall_get_arch() in arch/arm64 returns AUDIT_ARCH_AARCH64ILP32, which
fits the arm32 platform. Audit will gets a fault arch in this
situation and hence mismatch some syscall numbers in audit_match_perm().

This patch fixes it, and use the arch AUDIT_ARCH_AARCH64 which matches
all syscall numbers in arm64be_ilp32 platform.

Fixes: 0fe4141ba63a ("[Backport] arm64: introduce AUDIT_ARCH_AARCH64ILP32 for ilp32")
Signed-off-by: NChen Jiahao <chenjiahao16@huawei.com>
Reviewed-by: NLiao Chang <liaochang1@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 173849fd
...@@ -95,9 +95,6 @@ static inline int syscall_get_arch(struct task_struct *task) ...@@ -95,9 +95,6 @@ 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,7 +381,6 @@ enum { ...@@ -381,7 +381,6 @@ 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.
先完成此消息的编辑!
想要评论请 注册