]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
LoongArch: Handle CONFIG_32BIT in syscall_get_arch()
authorTiezhu Yang <yangtiezhu@loongson.cn>
Wed, 22 Apr 2026 07:45:11 +0000 (15:45 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Wed, 22 Apr 2026 07:45:11 +0000 (15:45 +0800)
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>
arch/loongarch/include/asm/syscall.h

index 81d2733f7b949af90f1f0d0b3a0fb61625bae685..df8ea223c77b1a61c761e434b99c147e1ddbc4f4 100644 (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)