X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=jail%2Fseccomp-bpf.h;h=fc3ffe75f295da510f81bd0e51acc4c28759a823;hp=40fe7b9c4fa8ba3af5ebdb549b84ac4674c6ebf3;hb=7aad9409d22dc38b71ec75d2aafcfa32426b5594;hpb=91f0891f7e2641330305f16d4738c4fb064c7449 diff --git a/jail/seccomp-bpf.h b/jail/seccomp-bpf.h index 40fe7b9..fc3ffe7 100644 --- a/jail/seccomp-bpf.h +++ b/jail/seccomp-bpf.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #ifndef PR_SET_NO_NEW_PRIVS @@ -40,6 +41,7 @@ #define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */ #define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */ #define SECCOMP_RET_LOG 0x00070000U +#define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */ #define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */ #define SECCOMP_RET_ERROR(x) (SECCOMP_RET_ERRNO | ((x) & 0x0000ffffU)) #define SECCOMP_RET_LOGGER(x) (SECCOMP_RET_LOG | ((x) & 0x0000ffffU)) @@ -67,10 +69,18 @@ struct seccomp_data { # define ARCH_NR AUDIT_ARCH_X86_64 #elif defined(__mips__) # define REG_SYSCALL regs[2] -# define ARCH_NR AUDIT_ARCH_MIPSEL +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define ARCH_NR AUDIT_ARCH_MIPSEL +# else +# define ARCH_NR AUDIT_ARCH_MIPS +# endif #elif defined(__arm__) && (defined(__ARM_EABI__) || defined(__thumb__)) # define REG_SYSCALL regs.uregs[7] -# define ARCH_NR AUDIT_ARCH_ARM +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define ARCH_NR AUDIT_ARCH_ARM +# else +# define ARCH_NR AUDIT_ARCH_ARMEB +# endif #else # warning "Platform does not support seccomp filter yet" # define REG_SYSCALL 0