mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-11 17:29:16 +05:00
nfqws,tpws: seccomp riscv64 compat
This commit is contained in:
parent
6cedc7301d
commit
12162f10e7
@ -117,7 +117,9 @@ SYS_rename,
|
||||
#ifdef SYS_renameat2
|
||||
SYS_renameat2,
|
||||
#endif
|
||||
#ifdef SYS_renameat
|
||||
SYS_renameat,
|
||||
#endif
|
||||
#ifdef SYS_readdir
|
||||
SYS_readdir,
|
||||
#endif
|
||||
|
13
nfq/sec.h
13
nfq/sec.h
@ -20,17 +20,14 @@ bool dropcaps(void);
|
||||
|
||||
#if defined(__aarch64__)
|
||||
|
||||
# define REG_SYSCALL regs.regs[8]
|
||||
# define ARCH_NR AUDIT_ARCH_AARCH64
|
||||
|
||||
#elif defined(__amd64__)
|
||||
|
||||
# define REG_SYSCALL REG_RAX
|
||||
# define ARCH_NR AUDIT_ARCH_X86_64
|
||||
|
||||
#elif defined(__arm__) && (defined(__ARM_EABI__) || defined(__thumb__))
|
||||
|
||||
# define REG_SYSCALL regs.uregs[7]
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define ARCH_NR AUDIT_ARCH_ARM
|
||||
# else
|
||||
@ -39,13 +36,10 @@ bool dropcaps(void);
|
||||
|
||||
#elif defined(__i386__)
|
||||
|
||||
# define REG_SYSCALL REG_EAX
|
||||
# define ARCH_NR AUDIT_ARCH_I386
|
||||
|
||||
#elif defined(__mips__)
|
||||
|
||||
# define REG_SYSCALL regs[2]
|
||||
|
||||
#if _MIPS_SIM == _MIPS_SIM_ABI32
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define ARCH_NR AUDIT_ARCH_MIPSEL
|
||||
@ -64,8 +58,6 @@ bool dropcaps(void);
|
||||
|
||||
#elif defined(__PPC64__)
|
||||
|
||||
# define REG_SYSCALL regs.gpr[0]
|
||||
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define ARCH_NR AUDIT_ARCH_PPC64LE
|
||||
# else
|
||||
@ -74,9 +66,12 @@ bool dropcaps(void);
|
||||
|
||||
#elif defined(__PPC__)
|
||||
|
||||
# define REG_SYSCALL regs.gpr[0]
|
||||
# define ARCH_NR AUDIT_ARCH_PPC
|
||||
|
||||
#elif __riscv && __riscv_xlen == 64
|
||||
|
||||
# define ARCH_NR AUDIT_ARCH_RISCV64
|
||||
|
||||
#else
|
||||
|
||||
# error "Platform does not support seccomp filter yet"
|
||||
|
@ -96,7 +96,9 @@ SYS_rename,
|
||||
#ifdef SYS_renameat2
|
||||
SYS_renameat2,
|
||||
#endif
|
||||
#ifdef SYS_renameat
|
||||
SYS_renameat,
|
||||
#endif
|
||||
#ifdef SYS_readdir
|
||||
SYS_readdir,
|
||||
#endif
|
||||
|
13
tpws/sec.h
13
tpws/sec.h
@ -22,17 +22,14 @@ bool dropcaps(void);
|
||||
|
||||
#if defined(__aarch64__)
|
||||
|
||||
# define REG_SYSCALL regs.regs[8]
|
||||
# define ARCH_NR AUDIT_ARCH_AARCH64
|
||||
|
||||
#elif defined(__amd64__)
|
||||
|
||||
# define REG_SYSCALL REG_RAX
|
||||
# define ARCH_NR AUDIT_ARCH_X86_64
|
||||
|
||||
#elif defined(__arm__) && (defined(__ARM_EABI__) || defined(__thumb__))
|
||||
|
||||
# define REG_SYSCALL regs.uregs[7]
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define ARCH_NR AUDIT_ARCH_ARM
|
||||
# else
|
||||
@ -41,13 +38,10 @@ bool dropcaps(void);
|
||||
|
||||
#elif defined(__i386__)
|
||||
|
||||
# define REG_SYSCALL REG_EAX
|
||||
# define ARCH_NR AUDIT_ARCH_I386
|
||||
|
||||
#elif defined(__mips__)
|
||||
|
||||
# define REG_SYSCALL regs[2]
|
||||
|
||||
#if _MIPS_SIM == _MIPS_SIM_ABI32
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define ARCH_NR AUDIT_ARCH_MIPSEL
|
||||
@ -66,8 +60,6 @@ bool dropcaps(void);
|
||||
|
||||
#elif defined(__PPC64__)
|
||||
|
||||
# define REG_SYSCALL regs.gpr[0]
|
||||
|
||||
# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define ARCH_NR AUDIT_ARCH_PPC64LE
|
||||
# else
|
||||
@ -76,9 +68,12 @@ bool dropcaps(void);
|
||||
|
||||
#elif defined(__PPC__)
|
||||
|
||||
# define REG_SYSCALL regs.gpr[0]
|
||||
# define ARCH_NR AUDIT_ARCH_PPC
|
||||
|
||||
#elif __riscv && __riscv_xlen == 64
|
||||
|
||||
# define ARCH_NR AUDIT_ARCH_RISCV64
|
||||
|
||||
#else
|
||||
|
||||
# error "Platform does not support seccomp filter yet"
|
||||
|
Loading…
Reference in New Issue
Block a user