Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 7577/1: arch/add syscall_get_arch

Provide an ARM implementation of syscall_get_arch. This is a pre-requisite
for CONFIG_HAVE_ARCH_SECCOMP_FILTER.

Signed-off-by: Will Drewry <wad@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Will Drewry and committed by
Russell King
1f59d13b 9ecb47de

+9
+9
arch/arm/include/asm/syscall.h
··· 7 7 #ifndef _ASM_ARM_SYSCALL_H 8 8 #define _ASM_ARM_SYSCALL_H 9 9 10 + #include <linux/audit.h> /* for AUDIT_ARCH_* */ 11 + #include <linux/elf.h> /* for ELF_EM */ 10 12 #include <linux/err.h> 11 13 #include <linux/sched.h> 12 14 ··· 95 93 } 96 94 97 95 memcpy(&regs->ARM_r0 + i, args, n * sizeof(args[0])); 96 + } 97 + 98 + static inline int syscall_get_arch(struct task_struct *task, 99 + struct pt_regs *regs) 100 + { 101 + /* ARM tasks don't change audit architectures on the fly. */ 102 + return AUDIT_ARCH_ARM; 98 103 } 99 104 100 105 #endif /* _ASM_ARM_SYSCALL_H */