0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _ASM_GENERIC_SECCOMP_H
0009 #define _ASM_GENERIC_SECCOMP_H
0010
0011 #include <linux/unistd.h>
0012
0013 #if defined(CONFIG_COMPAT) && !defined(__NR_seccomp_read_32)
0014 #define __NR_seccomp_read_32 __NR_read
0015 #define __NR_seccomp_write_32 __NR_write
0016 #define __NR_seccomp_exit_32 __NR_exit
0017 #ifndef __NR_seccomp_sigreturn_32
0018 #define __NR_seccomp_sigreturn_32 __NR_rt_sigreturn
0019 #endif
0020 #endif
0021
0022 #define __NR_seccomp_read __NR_read
0023 #define __NR_seccomp_write __NR_write
0024 #define __NR_seccomp_exit __NR_exit
0025 #ifndef __NR_seccomp_sigreturn
0026 #define __NR_seccomp_sigreturn __NR_rt_sigreturn
0027 #endif
0028
0029 #ifdef CONFIG_COMPAT
0030 #ifndef get_compat_mode1_syscalls
0031 static inline const int *get_compat_mode1_syscalls(void)
0032 {
0033 static const int mode1_syscalls_32[] = {
0034 __NR_seccomp_read_32, __NR_seccomp_write_32,
0035 __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32,
0036 -1,
0037 };
0038 return mode1_syscalls_32;
0039 }
0040 #endif
0041 #endif
0042
0043 #endif