seccomp.h 800 B

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