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

sh: Enable seccomp architecture tracking

To enable seccomp constant action bitmaps, we need to have a static
mapping to the audit architecture and system call table size. Add these
for sh.

Signed-off-by: YiFei Zhu <yifeifz2@illinois.edu>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/61ae084cd4783b9b50860d9dedb4a348cf1b7b6f.1605101222.git.yifeifz2@illinois.edu

authored by

YiFei Zhu and committed by
Kees Cook
4c18bc05 c09058ed

+10
+10
arch/sh/include/asm/seccomp.h
··· 8 8 #define __NR_seccomp_exit __NR_exit 9 9 #define __NR_seccomp_sigreturn __NR_rt_sigreturn 10 10 11 + #ifdef CONFIG_CPU_LITTLE_ENDIAN 12 + #define __SECCOMP_ARCH_LE __AUDIT_ARCH_LE 13 + #else 14 + #define __SECCOMP_ARCH_LE 0 15 + #endif 16 + 17 + #define SECCOMP_ARCH_NATIVE (AUDIT_ARCH_SH | __SECCOMP_ARCH_LE) 18 + #define SECCOMP_ARCH_NATIVE_NR NR_syscalls 19 + #define SECCOMP_ARCH_NATIVE_NAME "sh" 20 + 11 21 #endif /* __ASM_SECCOMP_H */