From 1758ae6be10c85ccd715c12be10d9a4b53d0ab0f Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 1 Jul 2015 13:52:39 -0400 Subject: arm: fix arm-specific syscall symbols The symbols are prefixed with __ARM_NR_, not __NR_. We still shoehorn the symbols into the __NR_ format for libseccomp though. Doing so keeps SCMP_SYS simple. Signed-off-by: Andrew Jones Signed-off-by: Paul Moore (imported from commit 0cad182e971a06d61aeeacc7bd0d94be872e37b8) --- include/seccomp.h.in | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/include/seccomp.h.in b/include/seccomp.h.in index 0751191..4cfc17c 100644 --- a/include/seccomp.h.in +++ b/include/seccomp.h.in @@ -1227,9 +1227,11 @@ int seccomp_export_bpf(const scmp_filter_ctx ctx, int fd); #endif /* __NR_cachectl */ #define __PNR_cacheflush -10104 -#ifndef __NR_cacheflush +#ifdef __ARM_NR_cacheflush +#define __NR_cacheflush __ARM_NR_cacheflush +#else #define __NR_cacheflush __PNR_cacheflush -#endif /* __NR_cacheflush */ +#endif /* __ARM_NR_cacheflush */ #define __PNR_sysmips -10106 #ifndef __NR_sysmips @@ -1447,24 +1449,32 @@ int seccomp_export_bpf(const scmp_filter_ctx ctx, int fd); #endif /* __NR_utimes */ #define __PNR_breakpoint -10182 -#ifndef __NR_breakpoint +#ifdef __ARM_NR_breakpoint +#define __NR_breakpoint __ARM_NR_breakpoint +#else #define __NR_breakpoint __PNR_breakpoint -#endif /* __NR_breakpoint */ +#endif /* __ARM_NR_breakpoint */ #define __PNR_set_tls -10183 -#ifndef __NR_set_tls +#ifdef __ARM_NR_set_tls +#define __NR_set_tls __ARM_NR_set_tls +#else #define __NR_set_tls __PNR_set_tls -#endif /* __NR_set_tls */ +#endif /* __ARM_NR_set_tls */ #define __PNR_usr26 -10184 -#ifndef __NR_usr26 +#ifdef __ARM_NR_usr26 +#define __NR_usr26 __ARM_NR_usr26 +#else #define __NR_usr26 __PNR_usr26 -#endif /* __NR_usr26 */ +#endif /* __ARM_NR_usr26 */ #define __PNR_usr32 -10185 -#ifndef __NR_usr32 +#ifdef __ARM_NR_usr32 +#define __NR_usr32 __ARM_NR_usr32 +#else #define __NR_usr32 __PNR_usr32 -#endif /* __NR_usr32 */ +#endif /* __ARM_NR_usr32 */ #ifdef __cplusplus } -- cgit v1.2.1