Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef __ASM_SECCOMP_H |
| 3 | |
| 4 | #include <linux/unistd.h> |
| 5 | |
| 6 | #ifdef CONFIG_COMPAT |
| 7 | static inline const int *get_compat_mode1_syscalls(void) |
| 8 | { |
| 9 | static const int syscalls_O32[] = { |
| 10 | __NR_O32_Linux + 3, __NR_O32_Linux + 4, |
| 11 | __NR_O32_Linux + 1, __NR_O32_Linux + 193, |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 12 | -1, /* negative terminated */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 13 | }; |
| 14 | static const int syscalls_N32[] = { |
| 15 | __NR_N32_Linux + 0, __NR_N32_Linux + 1, |
| 16 | __NR_N32_Linux + 58, __NR_N32_Linux + 211, |
Olivier Deprez | 157378f | 2022-04-04 15:47:50 +0200 | [diff] [blame^] | 17 | -1, /* negative terminated */ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 18 | }; |
| 19 | |
| 20 | if (IS_ENABLED(CONFIG_MIPS32_O32) && test_thread_flag(TIF_32BIT_REGS)) |
| 21 | return syscalls_O32; |
| 22 | |
| 23 | if (IS_ENABLED(CONFIG_MIPS32_N32)) |
| 24 | return syscalls_N32; |
| 25 | |
| 26 | BUG(); |
| 27 | } |
| 28 | |
| 29 | #define get_compat_mode1_syscalls get_compat_mode1_syscalls |
| 30 | |
| 31 | #endif /* CONFIG_COMPAT */ |
| 32 | |
| 33 | #include <asm-generic/seccomp.h> |
| 34 | |
| 35 | #endif /* __ASM_SECCOMP_H */ |