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>
master
Tiezhu Yang 2026-04-22 15:45:11 +08:00 committed by Huacai Chen
parent 8b81576c16
commit 1829419bc3
1 changed files with 4 additions and 0 deletions

View File

@ -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)