Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_X86_SECCOMP_H
0003 #define _ASM_X86_SECCOMP_H
0004 
0005 #include <asm/unistd.h>
0006 
0007 #ifdef CONFIG_X86_32
0008 #define __NR_seccomp_sigreturn      __NR_sigreturn
0009 #endif
0010 
0011 #ifdef CONFIG_COMPAT
0012 #include <asm/ia32_unistd.h>
0013 #define __NR_seccomp_read_32        __NR_ia32_read
0014 #define __NR_seccomp_write_32       __NR_ia32_write
0015 #define __NR_seccomp_exit_32        __NR_ia32_exit
0016 #define __NR_seccomp_sigreturn_32   __NR_ia32_sigreturn
0017 #endif
0018 
0019 #ifdef CONFIG_X86_64
0020 # define SECCOMP_ARCH_NATIVE        AUDIT_ARCH_X86_64
0021 # define SECCOMP_ARCH_NATIVE_NR     NR_syscalls
0022 # define SECCOMP_ARCH_NATIVE_NAME   "x86_64"
0023 # ifdef CONFIG_COMPAT
0024 #  define SECCOMP_ARCH_COMPAT       AUDIT_ARCH_I386
0025 #  define SECCOMP_ARCH_COMPAT_NR    IA32_NR_syscalls
0026 #  define SECCOMP_ARCH_COMPAT_NAME  "ia32"
0027 # endif
0028 /*
0029  * x32 will have __X32_SYSCALL_BIT set in syscall number. We don't support
0030  * caching them and they are treated as out of range syscalls, which will
0031  * always pass through the BPF filter.
0032  */
0033 #else /* !CONFIG_X86_64 */
0034 # define SECCOMP_ARCH_NATIVE        AUDIT_ARCH_I386
0035 # define SECCOMP_ARCH_NATIVE_NR         NR_syscalls
0036 # define SECCOMP_ARCH_NATIVE_NAME   "ia32"
0037 #endif
0038 
0039 #include <asm-generic/seccomp.h>
0040 
0041 #endif /* _ASM_X86_SECCOMP_H */