summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2026-04-22 10:45:11 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2026-04-22 10:45:11 +0300
commit1829419bc3b291ad9547abe70053c2620832ac41 (patch)
tree76fd3607a8b9338fa482aff4223d0c09b7199d56
parent8b81576c16c0681b0c0148200a8c3ce33ad5f6fa (diff)
downloadlinux-1829419bc3b291ad9547abe70053c2620832ac41.tar.xz
LoongArch: Handle CONFIG_32BIT in syscall_get_arch()
If CONFIG_32BIT is set, it should return AUDIT_ARCH_LOONGARCH32 instead of AUDIT_ARCH_LOONGARCH64 in syscall_get_arch(). Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
-rw-r--r--arch/loongarch/include/asm/syscall.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/syscall.h b/arch/loongarch/include/asm/syscall.h
index 81d2733f7b94..df8ea223c77b 100644
--- a/arch/loongarch/include/asm/syscall.h
+++ b/arch/loongarch/include/asm/syscall.h
@@ -78,7 +78,11 @@ static inline void syscall_set_arguments(struct task_struct *task,
static inline int syscall_get_arch(struct task_struct *task)
{
+#ifdef CONFIG_32BIT
+ return AUDIT_ARCH_LOONGARCH32;
+#else
return AUDIT_ARCH_LOONGARCH64;
+#endif
}
static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)