Linux Audio

Check our new training course

Loading...
v5.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef __ASM_SECCOMP_H
 3
 4#include <linux/unistd.h>
 5
 6#ifdef CONFIG_COMPAT
 7static 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,
12		0, /* null terminated */
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,
17		0, /* null terminated */
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 */
v4.6
 
 1#ifndef __ASM_SECCOMP_H
 2
 3#include <linux/unistd.h>
 4
 5/*
 6 * Kludge alert:
 7 *
 8 * The generic seccomp code currently allows only a single compat ABI.	Until
 9 * this is fixed we priorize O32 as the compat ABI over N32.
10 */
11#ifdef CONFIG_MIPS32_O32
12
13#define __NR_seccomp_read_32		4003
14#define __NR_seccomp_write_32		4004
15#define __NR_seccomp_exit_32		4001
16#define __NR_seccomp_sigreturn_32	4193	/* rt_sigreturn */
17
18#elif defined(CONFIG_MIPS32_N32)
19
20#define __NR_seccomp_read_32		6000
21#define __NR_seccomp_write_32		6001
22#define __NR_seccomp_exit_32		6058
23#define __NR_seccomp_sigreturn_32	6211	/* rt_sigreturn */
24
25#endif /* CONFIG_MIPS32_O32 */
 
 
 
 
 
26
27#include <asm-generic/seccomp.h>
28
29#endif /* __ASM_SECCOMP_H */