mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Make more fixes and improvements
This change attempts to fix some report build issues. It also builds upon development work described in previous changes.
This commit is contained in:
parent
9bfa6ec06e
commit
9d61e23c80
27 changed files with 980 additions and 902 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "libc/calls/struct/bpf.h"
|
||||
#include "libc/calls/struct/filter.h"
|
||||
#include "libc/calls/struct/seccomp.h"
|
||||
#include "libc/sysv/consts/audit.h"
|
||||
// clang-format off
|
||||
|
||||
#define _SECCOMP_MACHINE(MAGNUM) \
|
||||
|
@ -17,7 +18,15 @@
|
|||
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, MAGNUM, 0, 1), \
|
||||
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW)
|
||||
|
||||
#define _SECCOMP_TRAP_SYSCALL(MAGNUM, DATA) \
|
||||
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, MAGNUM, 0, 1), \
|
||||
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_TRAP | ((DATA) & SECCOMP_RET_DATA))
|
||||
|
||||
#define _SECCOMP_TRACE_SYSCALL(MAGNUM, DATA) \
|
||||
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, MAGNUM, 0, 1), \
|
||||
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_TRACE | ((DATA) & SECCOMP_RET_DATA))
|
||||
|
||||
#define _SECCOMP_LOG_AND_RETURN_ERRNO(MAGNUM) \
|
||||
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | (MAGNUM & SECCOMP_RET_DATA))
|
||||
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ERRNO | ((MAGNUM) & SECCOMP_RET_DATA))
|
||||
|
||||
#endif /* COSMOPOLITAN_TOOL_NET_SANDBOX_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue