xref: /openbmc/linux/arch/powerpc/include/asm/seccomp.h (revision e7bcb462)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_SECCOMP_H
3 #define _ASM_POWERPC_SECCOMP_H
4 
5 #include <linux/unistd.h>
6 
7 #define __NR_seccomp_sigreturn_32 __NR_sigreturn
8 
9 #include <asm-generic/seccomp.h>
10 
11 #ifdef __LITTLE_ENDIAN__
12 #define __SECCOMP_ARCH_LE		__AUDIT_ARCH_LE
13 #define __SECCOMP_ARCH_LE_NAME		"le"
14 #else
15 #define __SECCOMP_ARCH_LE		0
16 #define __SECCOMP_ARCH_LE_NAME
17 #endif
18 
19 #ifdef CONFIG_PPC64
20 # define SECCOMP_ARCH_NATIVE		(AUDIT_ARCH_PPC64 | __SECCOMP_ARCH_LE)
21 # define SECCOMP_ARCH_NATIVE_NR		NR_syscalls
22 # define SECCOMP_ARCH_NATIVE_NAME	"ppc64" __SECCOMP_ARCH_LE_NAME
23 # ifdef CONFIG_COMPAT
24 #  define SECCOMP_ARCH_COMPAT		(AUDIT_ARCH_PPC | __SECCOMP_ARCH_LE)
25 #  define SECCOMP_ARCH_COMPAT_NR	NR_syscalls
26 #  define SECCOMP_ARCH_COMPAT_NAME	"ppc" __SECCOMP_ARCH_LE_NAME
27 # endif
28 #else /* !CONFIG_PPC64 */
29 # define SECCOMP_ARCH_NATIVE		(AUDIT_ARCH_PPC | __SECCOMP_ARCH_LE)
30 # define SECCOMP_ARCH_NATIVE_NR		NR_syscalls
31 # define SECCOMP_ARCH_NATIVE_NAME	"ppc" __SECCOMP_ARCH_LE_NAME
32 #endif
33 
34 #endif	/* _ASM_POWERPC_SECCOMP_H */
35