seccomp.h 761 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __ASM_SECCOMP_H
  2. #include <linux/unistd.h>
  3. #ifdef CONFIG_COMPAT
  4. static inline const int *get_compat_mode1_syscalls(void)
  5. {
  6. static const int syscalls_O32[] = {
  7. __NR_O32_Linux + 3, __NR_O32_Linux + 4,
  8. __NR_O32_Linux + 1, __NR_O32_Linux + 193,
  9. 0, /* null terminated */
  10. };
  11. static const int syscalls_N32[] = {
  12. __NR_N32_Linux + 0, __NR_N32_Linux + 1,
  13. __NR_N32_Linux + 58, __NR_N32_Linux + 211,
  14. 0, /* null terminated */
  15. };
  16. if (IS_ENABLED(CONFIG_MIPS32_O32) && test_thread_flag(TIF_32BIT_REGS))
  17. return syscalls_O32;
  18. if (IS_ENABLED(CONFIG_MIPS32_N32))
  19. return syscalls_N32;
  20. BUG();
  21. }
  22. #define get_compat_mode1_syscalls get_compat_mode1_syscalls
  23. #endif /* CONFIG_COMPAT */
  24. #include <asm-generic/seccomp.h>
  25. #endif /* __ASM_SECCOMP_H */