From 2f23ceda449661d71961b6807d1dadc4afb08505 Mon Sep 17 00:00:00 2001 From: Victor Hsieh Date: Wed, 17 Jan 2018 16:59:12 -0800 Subject: [PATCH] Block bunch of privileged syscalls to apps Test: build, run some app Bug: 63944145 Change-Id: I13eb56f923732e110851dec02eaa11f6cb44535c --- libc/SECCOMP_BLACKLIST_APP.TXT | 68 +++++++++ libc/seccomp/arm64_app_policy.cpp | 78 ++++++---- libc/seccomp/arm_app_policy.cpp | 228 +++++++++++++++-------------- libc/seccomp/mips64_app_policy.cpp | 166 +++++++++++---------- libc/seccomp/mips_app_policy.cpp | 186 ++++++++++++----------- libc/seccomp/x86_64_app_policy.cpp | 176 ++++++++++++---------- libc/seccomp/x86_app_policy.cpp | 186 ++++++++++++----------- libc/tools/genseccomp.py | 4 +- 8 files changed, 621 insertions(+), 471 deletions(-) create mode 100644 libc/SECCOMP_BLACKLIST_APP.TXT diff --git a/libc/SECCOMP_BLACKLIST_APP.TXT b/libc/SECCOMP_BLACKLIST_APP.TXT new file mode 100644 index 0000000000..25542d68c5 --- /dev/null +++ b/libc/SECCOMP_BLACKLIST_APP.TXT @@ -0,0 +1,68 @@ +# This file is used to populate seccomp's whitelist policy in combination with SYSCALLS.TXT. +# Note that the resultant policy is applied only to zygote spawned processes. +# +# The final seccomp whitelist is SYSCALLS.TXT - SECCOMP_BLACKLIST.TXT + SECCOMP_WHITELIST.TXT +# Any entry in the blacklist must be in the syscalls file and not be in the whitelist file +# +# Each non-blank, non-comment line has the following format: +# +# return_type func_name[|alias_list][:syscall_name[:socketcall_id]]([parameter_list]) arch_list +# +# where: +# arch_list ::= "all" | arch+ +# arch ::= "arm" | "arm64" | "mips" | "mips64" | "x86" | "x86_64" +# +# Note: +# - syscall_name corresponds to the name of the syscall, which may differ from +# the exported function name (example: the exit syscall is implemented by the _exit() +# function, which is not the same as the standard C exit() function which calls it) + +# - alias_list is optional comma separated list of function aliases +# +# - The call_id parameter, given that func_name and syscall_name have +# been provided, allows the user to specify dispatch style syscalls. +# For example, socket() syscall on i386 actually becomes: +# socketcall(__NR_socket, 1, *(rest of args on stack)). +# +# - Each parameter type is assumed to be stored in 32 bits. +# +# This file is processed by a python script named genseccomp.py. + +# syscalls to modify IDs +int setgid:setgid32(gid_t) arm,x86 +int setgid:setgid(gid_t) arm64,mips,mips64,x86_64 +int setuid:setuid32(uid_t) arm,x86 +int setuid:setuid(uid_t) arm64,mips,mips64,x86_64 +int setreuid:setreuid32(uid_t, uid_t) arm,x86 +int setreuid:setreuid(uid_t, uid_t) arm64,mips,mips64,x86_64 +int setresuid:setresuid32(uid_t, uid_t, uid_t) arm,x86 +int setresuid:setresuid(uid_t, uid_t, uid_t) arm64,mips,mips64,x86_64 +int setresgid:setresgid32(gid_t, gid_t, gid_t) arm,x86 +int setresgid:setresgid(gid_t, gid_t, gid_t) arm64,mips,mips64,x86_64 +int setfsgid(gid_t) all +int setfsuid(uid_t) all +int setgroups:setgroups32(int, const gid_t*) arm,x86 +int setgroups:setgroups(int, const gid_t*) arm64,mips,mips64,x86_64 + +# syscalls to modify times +int adjtimex(struct timex*) all +int clock_adjtime(clockid_t, struct timex*) all +int clock_settime(clockid_t, const struct timespec*) all +int settimeofday(const struct timeval*, const struct timezone*) all + +int acct(const char* filepath) all +int klogctl:syslog(int, char*, int) all + +int capset(cap_user_header_t header, const cap_user_data_t data) all +int chroot(const char*) all + +# syscalls to change machine various configurations +int init_module(void*, unsigned long, const char*) all +int delete_module(const char*, unsigned int) all +int mount(const char*, const char*, const char*, unsigned long, const void*) all +int umount2(const char*, int) all +int swapon(const char*, int) all +int swapoff(const char*) all +int setdomainname(const char*, size_t) all +int sethostname(const char*, size_t) all +int __reboot:reboot(int, int, int, void*) all diff --git a/libc/seccomp/arm64_app_policy.cpp b/libc/seccomp/arm64_app_policy.cpp index 12722e1942..f7f0dc421f 100644 --- a/libc/seccomp/arm64_app_policy.cpp +++ b/libc/seccomp/arm64_app_policy.cpp @@ -5,36 +5,62 @@ #include "seccomp_bpfs.h" const sock_filter arm64_app_filter[] = { -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 32), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 220, 15, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 101, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 43, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 58), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 153, 29, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 101, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 52, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 41, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 19, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 18, 27, 26), //io_setup|io_destroy|io_submit|io_cancel|io_getevents|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|getcwd -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 42, 26, 25), //eventfd2|epoll_create1|epoll_ctl|epoll_pwait|dup|dup3|fcntl|inotify_init1|inotify_add_watch|inotify_rm_watch|ioctl|ioprio_set|ioprio_get|flock|mknodat|mkdirat|unlinkat|symlinkat|linkat|renameat|umount2|mount|pivot_root +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 18, 52, 51), //io_setup|io_destroy|io_submit|io_cancel|io_getevents|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|getcwd +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 39, 51, 50), //eventfd2|epoll_create1|epoll_ctl|epoll_pwait|dup|dup3|fcntl|inotify_init1|inotify_add_watch|inotify_rm_watch|ioctl|ioprio_set|ioprio_get|flock|mknodat|mkdirat|unlinkat|symlinkat|linkat|renameat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 43, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 42, 49, 48), //pivot_root +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 51, 48, 47), //statfs|fstatfs|truncate|ftruncate|fallocate|faccessat|chdir|fchdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 90, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 59, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 24, 23), //statfs|fstatfs|truncate|ftruncate|fallocate|faccessat|chdir|fchdir|chroot|fchmod|fchmodat|fchownat|fchown|openat|close -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 99, 23, 22), //pipe2|quotactl|getdents64|lseek|read|write|readv|writev|pread64|pwrite64|preadv|pwritev|sendfile|pselect6|ppoll|signalfd4|vmsplice|splice|tee|readlinkat|newfstatat|fstat|sync|fsync|fdatasync|sync_file_range|timerfd_create|timerfd_settime|timerfd_gettime|utimensat|acct|capget|capset|personality|exit|exit_group|waitid|set_tid_address|unshare|futex -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 198, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 105, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 104, 20, 19), //nanosleep|getitimer|setitimer -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 180, 19, 18), //init_module|delete_module|timer_create|timer_gettime|timer_getoverrun|timer_settime|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|syslog|ptrace|sched_setparam|sched_setscheduler|sched_getscheduler|sched_getparam|sched_setaffinity|sched_getaffinity|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|restart_syscall|kill|tkill|tgkill|sigaltstack|rt_sigsuspend|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigreturn|setpriority|getpriority|reboot|setregid|setgid|setreuid|setuid|setresuid|getresuid|setresgid|getresgid|setfsuid|setfsgid|times|setpgid|getpgid|getsid|setsid|getgroups|setgroups|uname|sethostname|setdomainname|getrlimit|setrlimit|getrusage|umask|prctl|getcpu|gettimeofday|settimeofday|adjtimex|getpid|getppid|getuid|geteuid|getgid|getegid|gettid|sysinfo +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 45, 44), //fchmod|fchmodat|fchownat|fchown|openat|close +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 89, 44, 43), //pipe2|quotactl|getdents64|lseek|read|write|readv|writev|pread64|pwrite64|preadv|pwritev|sendfile|pselect6|ppoll|signalfd4|vmsplice|splice|tee|readlinkat|newfstatat|fstat|sync|fsync|fdatasync|sync_file_range|timerfd_create|timerfd_settime|timerfd_gettime|utimensat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 92, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 91, 42, 41), //capget +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 99, 41, 40), //personality|exit|exit_group|waitid|set_tid_address|unshare|futex +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 143, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 113, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 107, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 104, 37, 36), //nanosleep|getitimer|setitimer +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 112, 36, 35), //timer_create|timer_gettime|timer_getoverrun|timer_settime|timer_delete +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 117, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 116, 34, 33), //clock_gettime|clock_getres|clock_nanosleep +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 142, 33, 32), //ptrace|sched_setparam|sched_setscheduler|sched_getscheduler|sched_getparam|sched_setaffinity|sched_getaffinity|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|restart_syscall|kill|tkill|tgkill|sigaltstack|rt_sigsuspend|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigreturn|setpriority|getpriority +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 150, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 148, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 144, 30, 29), //setregid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 149, 29, 28), //getresuid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 151, 28, 27), //getresgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 226, 13, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 198, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 163, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 160, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 159, 23, 22), //times|setpgid|getpgid|getsid|setsid|getgroups +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 161, 22, 21), //uname +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 170, 20, 19), //getrlimit|setrlimit|getrusage|umask|prctl|getcpu|gettimeofday +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 180, 19, 18), //getpid|getppid|getuid|geteuid|getgid|getegid|gettid|sysinfo +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 220, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 203, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 202, 17, 16), //socket|socketpair|bind|listen -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 16, 15), //connect|getsockname|getpeername|sendto|recvfrom|setsockopt|getsockopt|shutdown|sendmsg|recvmsg|readahead|brk|munmap|mremap -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 266, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 240, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 226, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 224, 12, 11), //clone|execve|mmap|fadvise64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 234, 11, 10), //mprotect|msync|mlock|munlock|mlockall|munlockall|mincore|madvise -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 260, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 202, 16, 15), //socket|socketpair|bind|listen +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 15, 14), //connect|getsockname|getpeername|sendto|recvfrom|setsockopt|getsockopt|shutdown|sendmsg|recvmsg|readahead|brk|munmap|mremap +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 224, 14, 13), //clone|execve|mmap|fadvise64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 274, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 260, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 240, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 234, 10, 9), //mprotect|msync|mlock|munlock|mlockall|munlockall|mincore|madvise BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 244, 9, 8), //rt_tgsigqueueinfo|perf_event_open|accept4|recvmmsg -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 262, 8, 7), //wait4|prlimit64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 281, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 274, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 272, 5, 4), //clock_adjtime|syncfs|setns|sendmmsg|process_vm_readv|process_vm_writev -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 4, 3), //sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 284, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 267, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 262, 7, 6), //wait4|prlimit64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 272, 6, 5), //syncfs|setns|sendmmsg|process_vm_readv|process_vm_writev +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 284, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 281, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 3, 2), //sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 282, 2, 1), //execveat BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 288, 1, 0), //mlock2|copy_file_range|preadv2|pwritev2 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), diff --git a/libc/seccomp/arm_app_policy.cpp b/libc/seccomp/arm_app_policy.cpp index d0fd6cacba..b5d98dce4a 100644 --- a/libc/seccomp/arm_app_policy.cpp +++ b/libc/seccomp/arm_app_policy.cpp @@ -5,130 +5,136 @@ #include "seccomp_bpfs.h" const sock_filter arm_app_filter[] = { -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 126), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 150, 63, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 74, 31, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 41, 15, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 24, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 132), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 183, 65, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 85, 33, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 45, 17, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 26, 9, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 19, 5, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 10, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 8, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 7, 119, 118), //restart_syscall|exit|fork|read|write|open|close -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 9, 118, 117), //creat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 19, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 13, 116, 115), //unlink|execve|chdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 22, 115, 114), //lseek|getpid|mount -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 33, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 26, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 25, 112, 111), //getuid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 27, 111, 110), //ptrace -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 36, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 34, 109, 108), //access -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 40, 108, 107), //sync|kill|rename|mkdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 51, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 45, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 104, 103), //dup|pipe|times -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 46, 103, 102), //brk +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 7, 124, 123), //restart_syscall|exit|fork|read|write|open|close +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 9, 123, 122), //creat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 13, 122, 121), //unlink|execve|chdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 24, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 21, 120, 119), //lseek|getpid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 25, 119, 118), //getuid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 36, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 33, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 27, 116, 115), //ptrace +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 34, 115, 114), //access +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 41, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 40, 113, 112), //sync|kill|rename|mkdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 112, 111), //dup|pipe|times +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 63, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 54, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 53, 101, 100), //acct|umount2 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 56, 100, 99), //ioctl|fcntl -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 63, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 46, 108, 107), //brk +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 56, 107, 106), //ioctl|fcntl BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 60, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 97, 96), //setpgid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 62, 96, 95), //umask|chroot +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 105, 104), //setpgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 61, 104, 103), //umask +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 75, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 66, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 65, 94, 93), //dup2|getppid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 68, 93, 92), //setsid|sigaction -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 114, 15, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 91, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 85, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 65, 101, 100), //dup2|getppid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 68, 100, 99), //setsid|sigaction BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 77, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 76, 88, 87), //sethostname|setrlimit -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 80, 87, 86), //getrusage|gettimeofday|settimeofday -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 88, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 86, 85, 84), //readlink -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 89, 84, 83), //reboot -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 96, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 81, 80), //munmap|truncate -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 80, 79), //fchmod -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 103, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 98, 78, 77), //getpriority|setpriority -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 106, 77, 76), //syslog|setitimer|getitimer -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 128, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 118, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 116, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 115, 73, 72), //wait4 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 117, 72, 71), //sysinfo -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 124, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 123, 70, 69), //fsync|sigreturn|clone|setdomainname|uname -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 126, 69, 68), //adjtimex|mprotect -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 136, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 131, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 130, 66, 65), //init_module|delete_module -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 134, 65, 64), //quotactl|getpgid|fchdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 138, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 63, 62), //personality -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 149, 62, 61), //setfsuid|setfsgid|_llseek|getdents|_newselect|flock|msync|readv|writev|getsid|fdatasync -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 292, 31, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 219, 15, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 190, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 168, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 164, 56, 55), //mlock|munlock|mlockall|munlockall|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|nanosleep|mremap -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 169, 55, 54), //poll -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 183, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 182, 53, 52), //prctl|rt_sigreturn|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|pread64|pwrite64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 188, 52, 51), //getcwd|capget|capset|sigaltstack|sendfile -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 213, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 199, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 198, 49, 48), //vfork|ugetrlimit|mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 212, 48, 47), //getuid32|getgid32|geteuid32|getegid32|setreuid32|setregid32|getgroups32|setgroups32|fchown32|setresuid32|getresuid32|setresgid32|getresgid32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 76, 98, 97), //setrlimit +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 79, 97, 96), //getrusage|gettimeofday +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 122, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 104, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 91, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 86, 92, 91), //readlink +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 91, 90), //munmap|truncate +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 96, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 89, 88), //fchmod +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 98, 88, 87), //getpriority|setpriority +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 116, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 114, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 106, 85, 84), //setitimer|getitimer +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 115, 84, 83), //wait4 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 118, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 117, 82, 81), //sysinfo +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 121, 81, 80), //fsync|sigreturn|clone +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 140, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 131, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 125, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 123, 77, 76), //uname +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 126, 76, 75), //mprotect +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 136, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 134, 74, 73), //quotactl|getpgid|fchdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 73, 72), //personality +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 168, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 150, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 149, 70, 69), //_llseek|getdents|_newselect|flock|msync|readv|writev|getsid|fdatasync +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 164, 69, 68), //mlock|munlock|mlockall|munlockall|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|nanosleep|mremap +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 169, 67, 66), //poll +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 182, 66, 65), //prctl|rt_sigreturn|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|pread64|pwrite64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 290, 33, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 219, 17, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 207, 9, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 199, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 190, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 186, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 185, 59, 58), //getcwd|capget +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 188, 58, 57), //sigaltstack|sendfile +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 198, 57, 56), //vfork|ugetrlimit|mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 204, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 203, 55, 54), //getuid32|getgid32|geteuid32|getegid32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 206, 54, 53), //setregid32|getgroups32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 211, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 209, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 208, 51, 50), //fchown32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 210, 50, 49), //getresuid32 BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 215, 46, 45), //setuid32|setgid32 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 218, 45, 44), //getdents64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 270, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 212, 48, 47), //getresgid32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 218, 47, 46), //getdents64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 263, 7, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 250, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 224, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 222, 41, 40), //mincore|madvise|fcntl64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 249, 40, 39), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64|futex|sched_setaffinity|sched_getaffinity|io_setup|io_destroy|io_getevents|io_submit|io_cancel|exit_group +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 222, 43, 42), //mincore|madvise|fcntl64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 249, 42, 41), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64|futex|sched_setaffinity|sched_getaffinity|io_setup|io_destroy|io_getevents|io_submit|io_cancel|exit_group BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 254, 38, 37), //epoll_create|epoll_ctl|epoll_wait|remap_file_pages -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 269, 37, 36), //set_tid_address|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|statfs64|fstatfs64|tgkill -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 286, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 271, 34, 33), //arm_fadvise64_64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 254, 40, 39), //epoll_create|epoll_ctl|epoll_wait|remap_file_pages +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 262, 39, 38), //set_tid_address|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 270, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 269, 36, 35), //clock_gettime|clock_getres|clock_nanosleep|statfs64|fstatfs64|tgkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 271, 35, 34), //arm_fadvise64_64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 286, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 285, 33, 32), //waitid|socket|bind|connect|listen -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 290, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 289, 31, 30), //getsockname|getpeername|socketpair -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 291, 30, 29), //sendto -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 369, 15, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 340, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 322, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 316, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 298, 25, 24), //recvfrom|shutdown|setsockopt|getsockopt|sendmsg|recvmsg +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 289, 32, 31), //getsockname|getpeername|socketpair +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 350, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 327, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 316, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 292, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 291, 27, 26), //sendto +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 298, 26, 25), //recvfrom|shutdown|setsockopt|getsockopt|sendmsg|recvmsg +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 322, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 319, 24, 23), //inotify_init|inotify_add_watch|inotify_rm_watch -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 327, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 326, 22, 21), //openat|mkdirat|mknodat|fchownat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 338, 21, 20), //fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 348, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 345, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 344, 18, 17), //splice|sync_file_range2|tee|vmsplice +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 326, 23, 22), //openat|mkdirat|mknodat|fchownat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 345, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 340, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 338, 20, 19), //fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 344, 19, 18), //splice|sync_file_range2|tee|vmsplice +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 348, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 347, 17, 16), //getcpu|epoll_pwait -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 350, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 349, 15, 14), //utimensat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 367, 14, 13), //timerfd_create|eventfd|fallocate|timerfd_settime|timerfd_gettime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|recvmmsg|accept4 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 390, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 380, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 372, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 370, 10, 9), //prlimit64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 378, 9, 8), //clock_adjtime|syncfs|sendmmsg|setns|process_vm_readv|process_vm_writev -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 387, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 386, 7, 6), //sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 388, 6, 5), //execveat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983045, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983042, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 394, 3, 2), //mlock2|copy_file_range|preadv2|pwritev2 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 349, 16, 15), //utimensat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 387, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 373, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 369, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 367, 12, 11), //timerfd_create|eventfd|fallocate|timerfd_settime|timerfd_gettime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|recvmmsg|accept4 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 370, 11, 10), //prlimit64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 380, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 378, 9, 8), //syncfs|sendmmsg|setns|process_vm_readv|process_vm_writev +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 386, 8, 7), //sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983042, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 390, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 388, 5, 4), //execveat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 394, 4, 3), //mlock2|copy_file_range|preadv2|pwritev2 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983045, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983043, 2, 1), //__ARM_NR_cacheflush BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 983046, 1, 0), //__ARM_NR_set_tls BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), diff --git a/libc/seccomp/mips64_app_policy.cpp b/libc/seccomp/mips64_app_policy.cpp index 27bb0fa172..6ff4d9ac9a 100644 --- a/libc/seccomp/mips64_app_policy.cpp +++ b/libc/seccomp/mips64_app_policy.cpp @@ -5,88 +5,104 @@ #include "seccomp_bpfs.h" const sock_filter mips64_app_filter[] = { -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5000, 0, 84), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5164, 41, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5077, 21, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5034, 11, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5008, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5000, 0, 100), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5137, 49, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5091, 25, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5038, 13, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5023, 7, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5005, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5003, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5002, 77, 76), //read|write -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5004, 76, 75), //close -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5006, 75, 74), //fstat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5031, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5023, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5020, 72, 71), //lseek|mmap|mprotect|munmap|brk|rt_sigaction|rt_sigprocmask|ioctl|pread64|pwrite64|readv|writev -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5028, 71, 70), //sched_yield|mremap|msync|mincore|madvise -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5032, 70, 69), //dup -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5057, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5043, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5038, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5037, 66, 65), //nanosleep|getitimer|setitimer -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5042, 65, 64), //getpid|sendfile|socket|connect -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5056, 64, 63), //sendto|recvfrom|sendmsg|recvmsg|shutdown|bind|listen|getsockname|getpeername|socketpair|setsockopt|getsockopt|clone -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5070, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5062, 62, 61), //execve|exit|wait4|kill|uname -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5076, 61, 60), //fcntl|flock|fsync|fdatasync|truncate|ftruncate -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5132, 9, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5093, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5091, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5089, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5080, 56, 55), //getcwd|chdir|fchdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5090, 55, 54), //fchmod -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5092, 54, 53), //fchown +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5002, 93, 92), //read|write +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5004, 92, 91), //close +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5008, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5006, 90, 89), //fstat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5020, 89, 88), //lseek|mmap|mprotect|munmap|brk|rt_sigaction|rt_sigprocmask|ioctl|pread64|pwrite64|readv|writev +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5034, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5031, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5028, 86, 85), //sched_yield|mremap|msync|mincore|madvise +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5032, 85, 84), //dup +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5037, 84, 83), //nanosleep|getitimer|setitimer +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5070, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5057, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5043, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5042, 80, 79), //getpid|sendfile|socket|connect +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5056, 79, 78), //sendto|recvfrom|sendmsg|recvmsg|shutdown|bind|listen|getsockname|getpeername|socketpair|setsockopt|getsockopt|clone +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5062, 78, 77), //execve|exit|wait4|kill|uname +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5089, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5077, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5076, 75, 74), //fcntl|flock|fsync|fdatasync|truncate|ftruncate +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5080, 74, 73), //getcwd|chdir|fchdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5090, 73, 72), //fchmod +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5116, 11, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5105, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5102, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5093, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5092, 68, 67), //fchown +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5101, 67, 66), //umask|gettimeofday|getrlimit|getrusage|sysinfo|times|ptrace|getuid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5103, 66, 65), //getgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5112, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5110, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5109, 52, 51), //umask|gettimeofday|getrlimit|getrusage|sysinfo|times|ptrace|getuid|syslog|getgid|setuid|setgid|geteuid|getegid|setpgid|getppid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5130, 51, 50), //setsid|setreuid|setregid|getgroups|setgroups|setresuid|getresuid|setresgid|getresgid|getpgid|setfsuid|setfsgid|getsid|capget|capset|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|sigaltstack -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5151, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5137, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5134, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5133, 47, 46), //personality -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5136, 46, 45), //statfs|fstatfs -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5150, 45, 44), //getpriority|setpriority|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|mlock|munlock|mlockall|munlockall -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5153, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5109, 63, 62), //geteuid|getegid|setpgid|getppid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5111, 62, 61), //setsid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5114, 61, 60), //setregid|getgroups +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5125, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5122, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5118, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5117, 57, 56), //getresuid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5120, 56, 55), //getresgid|getpgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5124, 55, 54), //getsid|capget +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5134, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5132, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5130, 52, 51), //rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|sigaltstack +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5133, 51, 50), //personality +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5136, 50, 49), //statfs|fstatfs +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5237, 25, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5194, 13, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5157, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5153, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5151, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5150, 44, 43), //getpriority|setpriority|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|mlock|munlock|mlockall|munlockall BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5152, 43, 42), //pivot_root -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5162, 42, 41), //prctl|adjtimex|setrlimit|chroot|sync|acct|settimeofday|mount|umount2 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5244, 21, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5208, 11, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5178, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5172, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5168, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5167, 36, 35), //reboot|sethostname|setdomainname -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5170, 35, 34), //init_module|delete_module -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5173, 34, 33), //quotactl -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5200, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5194, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5193, 31, 30), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5198, 30, 29), //futex|sched_setaffinity|sched_getaffinity|cacheflush -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5206, 29, 28), //io_setup|io_destroy|io_getevents|io_submit|io_cancel|exit_group -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5237, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5215, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5211, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5209, 25, 24), //epoll_ctl -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5214, 24, 23), //rt_sigreturn|set_tid_address|restart_syscall -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5226, 23, 22), //fadvise64|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|tgkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5155, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5154, 41, 40), //prctl +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5156, 40, 39), //setrlimit +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5178, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5172, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5158, 37, 36), //sync +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5173, 36, 35), //quotactl +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5193, 35, 34), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5211, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5208, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5200, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5198, 31, 30), //futex|sched_setaffinity|sched_getaffinity|cacheflush +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5206, 30, 29), //io_setup|io_destroy|io_getevents|io_submit|io_cancel|exit_group +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5209, 29, 28), //epoll_ctl +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5222, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5215, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5214, 26, 25), //rt_sigreturn|set_tid_address|restart_syscall +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5221, 25, 24), //fadvise64|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5226, 24, 23), //clock_gettime|clock_getres|clock_nanosleep|tgkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5279, 11, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5247, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5244, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5242, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5238, 21, 20), //waitid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5243, 20, 19), //set_thread_area -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5297, 9, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5271, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5252, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5247, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5246, 15, 14), //inotify_add_watch|inotify_rm_watch +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5238, 19, 18), //waitid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5243, 18, 17), //set_thread_area +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5246, 17, 16), //inotify_add_watch|inotify_rm_watch +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5271, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5252, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5251, 14, 13), //openat|mkdirat|mknodat|fchownat BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5267, 13, 12), //newfstatat|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare|splice|sync_file_range|tee|vmsplice -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5279, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5276, 11, 10), //getcpu|epoll_pwait|ioprio_set|ioprio_get|utimensat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5295, 10, 9), //fallocate|timerfd_create|timerfd_gettime|timerfd_settime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|accept4|recvmmsg -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5316, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5308, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5300, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5298, 6, 5), //prlimit64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5306, 5, 4), //clock_adjtime|syncfs|sendmmsg|setns|process_vm_readv|process_vm_writev -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5315, 4, 3), //getdents64|sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5319, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5276, 12, 11), //getcpu|epoll_pwait|ioprio_set|ioprio_get|utimensat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5308, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5301, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5297, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5295, 8, 7), //fallocate|timerfd_create|timerfd_gettime|timerfd_settime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|accept4|recvmmsg +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5298, 7, 6), //prlimit64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5306, 6, 5), //syncfs|sendmmsg|setns|process_vm_readv|process_vm_writev +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5319, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5316, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5315, 3, 2), //getdents64|sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5317, 2, 1), //execveat BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5323, 1, 0), //mlock2|copy_file_range|preadv2|pwritev2 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), diff --git a/libc/seccomp/mips_app_policy.cpp b/libc/seccomp/mips_app_policy.cpp index abda7eb1c5..bc1a924be2 100644 --- a/libc/seccomp/mips_app_policy.cpp +++ b/libc/seccomp/mips_app_policy.cpp @@ -5,111 +5,119 @@ #include "seccomp_bpfs.h" const sock_filter mips_app_filter[] = { -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4001, 0, 110), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4131, 55, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4063, 27, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4036, 13, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4023, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4001, 0, 118), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4136, 59, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4063, 29, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4041, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4024, 7, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4010, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4008, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4007, 103, 102), //exit|fork|read|write|open|close -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4009, 102, 101), //creat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4007, 111, 110), //exit|fork|read|write|open|close +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4009, 110, 109), //creat BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4019, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4013, 100, 99), //unlink|execve|chdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4022, 99, 98), //lseek|getpid|mount +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4013, 108, 107), //unlink|execve|chdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4021, 107, 106), //lseek|getpid BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4033, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4026, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4025, 96, 95), //setuid|getuid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4027, 95, 94), //ptrace -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4034, 94, 93), //access +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4025, 104, 103), //getuid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4027, 103, 102), //ptrace +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4036, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4034, 101, 100), //access +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4040, 100, 99), //sync|kill|rename|mkdir BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4054, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4045, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4041, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4040, 90, 89), //sync|kill|rename|mkdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4044, 89, 88), //dup|pipe|times +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4047, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4045, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4044, 96, 95), //dup|pipe|times +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4046, 95, 94), //brk BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4049, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4048, 87, 86), //brk|setgid|getgid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4053, 86, 85), //geteuid|getegid|acct|umount2 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4048, 93, 92), //getgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4051, 92, 91), //geteuid|getegid BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4060, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4057, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4056, 83, 82), //ioctl|fcntl -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4058, 82, 81), //setpgid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4062, 81, 80), //umask|chroot -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4094, 13, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4085, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4070, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4056, 89, 88), //ioctl|fcntl +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4058, 88, 87), //setpgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4061, 87, 86), //umask +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4104, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4080, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4071, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4066, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4065, 76, 75), //dup2|getppid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4068, 75, 74), //setsid|sigaction -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4074, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4072, 73, 72), //setreuid|setregid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4082, 72, 71), //sethostname|setrlimit|getrlimit|getrusage|gettimeofday|settimeofday|getgroups|setgroups +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4065, 82, 81), //dup2|getppid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4068, 81, 80), //setsid|sigaction +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4075, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4072, 79, 78), //setregid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4079, 78, 77), //setrlimit|getrlimit|getrusage|gettimeofday BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4090, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4088, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4086, 69, 68), //readlink -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4089, 68, 67), //reboot -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4093, 67, 66), //mmap|munmap|truncate -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4118, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4114, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4103, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4098, 63, 62), //fchmod|fchown|getpriority|setpriority -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4106, 62, 61), //syslog|setitimer|getitimer -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4116, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4115, 60, 59), //wait4 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4117, 59, 58), //sysinfo -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4128, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4124, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4123, 56, 55), //fsync|sigreturn|clone|setdomainname|uname -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4126, 55, 54), //adjtimex|mprotect -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4130, 54, 53), //init_module|delete_module -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4248, 27, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4179, 13, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4154, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4138, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4136, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4134, 48, 47), //quotactl|getpgid|fchdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4137, 47, 46), //personality -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4151, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4148, 45, 44), //setfsuid|setfsgid|_llseek|getdents|_newselect|flock|msync|readv|writev|cacheflush -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4153, 44, 43), //getsid|fdatasync -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4176, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4169, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4168, 41, 40), //mlock|munlock|mlockall|munlockall|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|nanosleep|mremap -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4175, 40, 39), //bind|connect|getpeername|getsockname|getsockopt|listen -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4178, 39, 38), //recvfrom|recvmsg +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4085, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4081, 75, 74), //getgroups +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4086, 74, 73), //readlink +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4094, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4093, 72, 71), //mmap|munmap|truncate +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4098, 71, 70), //fchmod|fchown|getpriority|setpriority +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4122, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4116, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4114, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4106, 67, 66), //setitimer|getitimer +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4115, 66, 65), //wait4 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4118, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4117, 64, 63), //sysinfo +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4121, 63, 62), //fsync|sigreturn|clone +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4131, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4125, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4123, 60, 59), //uname +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4126, 59, 58), //mprotect +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4134, 58, 57), //quotactl|getpgid|fchdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4248, 29, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4188, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4169, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4151, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4140, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4137, 52, 51), //personality +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4148, 51, 50), //_llseek|getdents|_newselect|flock|msync|readv|writev|cacheflush +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4154, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4153, 49, 48), //getsid|fdatasync +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4168, 48, 47), //mlock|munlock|mlockall|munlockall|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|nanosleep|mremap +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4179, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4176, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4175, 45, 44), //bind|connect|getpeername|getsockname|getsockopt|listen +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4178, 44, 43), //recvfrom|recvmsg +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4186, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4185, 42, 41), //sendmsg|sendto|setsockopt|shutdown|socket|socketpair +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4187, 41, 40), //getresuid BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4210, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4190, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4188, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4187, 35, 34), //sendmsg|sendto|setsockopt|shutdown|socket|socketpair|setresuid|getresuid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4189, 34, 33), //poll -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4203, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4202, 32, 31), //setresgid|getresgid|prctl|rt_sigreturn|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|pread64|pwrite64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4208, 31, 30), //getcwd|capget|capset|sigaltstack|sendfile +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4203, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4191, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4189, 37, 36), //poll +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4202, 36, 35), //getresgid|prctl|rt_sigreturn|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|pread64|pwrite64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4206, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4205, 34, 33), //getcwd|capget +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4208, 33, 32), //sigaltstack|sendfile BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4222, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4217, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4216, 28, 27), //mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4221, 27, 26), //mincore|madvise|getdents64|fcntl64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4247, 26, 25), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64|futex|sched_setaffinity|sched_getaffinity|io_setup|io_destroy|io_getevents|io_submit|io_cancel|exit_group -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4319, 13, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4293, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4283, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4278, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4267, 21, 20), //epoll_create|epoll_ctl|epoll_wait|remap_file_pages|set_tid_address|restart_syscall|fadvise64|statfs64|fstatfs64|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|tgkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4216, 30, 29), //mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4221, 29, 28), //mincore|madvise|getdents64|fcntl64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4247, 28, 27), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64|futex|sched_setaffinity|sched_getaffinity|io_setup|io_destroy|io_getevents|io_submit|io_cancel|exit_group +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4316, 13, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4288, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4278, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4263, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4262, 23, 22), //epoll_create|epoll_ctl|epoll_wait|remap_file_pages|set_tid_address|restart_syscall|fadvise64|statfs64|fstatfs64|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4267, 22, 21), //clock_gettime|clock_getres|clock_nanosleep|tgkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4283, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4279, 20, 19), //waitid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4288, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4287, 18, 17), //set_thread_area|inotify_init|inotify_add_watch|inotify_rm_watch -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4292, 17, 16), //openat|mkdirat|mknodat|fchownat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4316, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4312, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4308, 14, 13), //fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare|splice|sync_file_range|tee|vmsplice -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4314, 13, 12), //getcpu|epoll_pwait -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4317, 12, 11), //utimensat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4349, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4341, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4338, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4336, 8, 7), //eventfd|fallocate|timerfd_create|timerfd_gettime|timerfd_settime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|accept4|recvmmsg +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4287, 19, 18), //set_thread_area|inotify_init|inotify_add_watch|inotify_rm_watch +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4312, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4293, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4292, 16, 15), //openat|mkdirat|mknodat|fchownat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4308, 15, 14), //fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare|splice|sync_file_range|tee|vmsplice +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4314, 14, 13), //getcpu|epoll_pwait +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4349, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4338, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4319, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4317, 10, 9), //utimensat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4336, 9, 8), //eventfd|fallocate|timerfd_create|timerfd_gettime|timerfd_settime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|accept4|recvmmsg +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4342, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4339, 7, 6), //prlimit64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4347, 6, 5), //clock_adjtime|syncfs|sendmmsg|setns|process_vm_readv|process_vm_writev +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4347, 6, 5), //syncfs|sendmmsg|setns|process_vm_readv|process_vm_writev BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4359, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4356, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4355, 3, 2), //sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create diff --git a/libc/seccomp/x86_64_app_policy.cpp b/libc/seccomp/x86_64_app_policy.cpp index 171b95902a..b90124b827 100644 --- a/libc/seccomp/x86_64_app_policy.cpp +++ b/libc/seccomp/x86_64_app_policy.cpp @@ -5,92 +5,108 @@ #include "seccomp_bpfs.h" const sock_filter x86_64_app_filter[] = { -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 88), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 175, 43, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 79, 21, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 35, 11, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 8, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 104), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 155, 51, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 25, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 38, 13, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 24, 7, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 3, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 2, 81, 80), //read|write -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4, 80, 79), //close -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 6, 79, 78), //fstat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 32, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 24, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 21, 76, 75), //lseek|mmap|mprotect|munmap|brk|rt_sigaction|rt_sigprocmask|rt_sigreturn|ioctl|pread64|pwrite64|readv|writev -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 29, 75, 74), //sched_yield|mremap|msync|mincore|madvise -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 33, 74, 73), //dup -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 38, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 37, 70, 69), //nanosleep|getitimer -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 43, 69, 68), //setitimer|getpid|sendfile|socket|connect -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 68, 67), //sendto|recvfrom|sendmsg|recvmsg|shutdown|bind|listen|getsockname|getpeername|socketpair|setsockopt|getsockopt|clone -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 72, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 64, 66, 65), //vfork|execve|exit|wait4|kill|uname -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 78, 65, 64), //fcntl|flock|fsync|fdatasync|truncate|ftruncate -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 11, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 91, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 82, 60, 59), //getcwd|chdir|fchdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 92, 59, 58), //fchmod -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 58, 57), //fchown -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 135, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 112, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 111, 55, 54), //umask|gettimeofday|getrlimit|getrusage|sysinfo|times|ptrace|getuid|syslog|getgid|setuid|setgid|geteuid|getegid|setpgid|getppid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 132, 54, 53), //setsid|setreuid|setregid|getgroups|setgroups|setresuid|getresuid|setresgid|getresgid|getpgid|setfsuid|setfsgid|getsid|capget|capset|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|sigaltstack -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 136, 53, 52), //personality -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 157, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 155, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 140, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 139, 49, 48), //statfs|fstatfs -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 153, 48, 47), //getpriority|setpriority|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|mlock|munlock|mlockall|munlockall -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 156, 47, 46), //pivot_root -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 169, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 167, 45, 44), //prctl|arch_prctl|adjtimex|setrlimit|chroot|sync|acct|settimeofday|mount|umount2 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 44, 43), //reboot|sethostname|setdomainname -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 257, 21, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 221, 11, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 202, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 186, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 179, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 177, 38, 37), //init_module|delete_module -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 180, 37, 36), //quotactl -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 201, 36, 35), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 206, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 205, 33, 32), //futex|sched_setaffinity|sched_getaffinity -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 211, 32, 31), //io_setup|io_destroy|io_getevents|io_submit|io_cancel -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 220, 31, 30), //getdents64|set_tid_address|restart_syscall -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 251, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 2, 97, 96), //read|write +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4, 96, 95), //close +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 8, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 6, 94, 93), //fstat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 21, 93, 92), //lseek|mmap|mprotect|munmap|brk|rt_sigaction|rt_sigprocmask|rt_sigreturn|ioctl|pread64|pwrite64|readv|writev +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 35, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 32, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 29, 90, 89), //sched_yield|mremap|msync|mincore|madvise +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 33, 89, 88), //dup +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 37, 88, 87), //nanosleep|getitimer +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 72, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 43, 84, 83), //setitimer|getpid|sendfile|socket|connect +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 83, 82), //sendto|recvfrom|sendmsg|recvmsg|shutdown|bind|listen|getsockname|getpeername|socketpair|setsockopt|getsockopt|clone +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 64, 82, 81), //vfork|execve|exit|wait4|kill|uname +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 91, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 79, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 78, 79, 78), //fcntl|flock|fsync|fdatasync|truncate|ftruncate +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 82, 78, 77), //getcwd|chdir|fchdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 92, 77, 76), //fchmod +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 120, 13, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 112, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 104, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 72, 71), //fchown +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 103, 71, 70), //umask|gettimeofday|getrlimit|getrusage|sysinfo|times|ptrace|getuid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 107, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 105, 69, 68), //getgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 111, 68, 67), //geteuid|getegid|setpgid|getppid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 118, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 114, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 113, 65, 64), //setsid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 116, 64, 63), //setregid|getgroups +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 119, 63, 62), //getresuid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 135, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 127, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 124, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 122, 59, 58), //getresgid|getpgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 126, 58, 57), //getsid|capget +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 132, 57, 56), //rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|sigaltstack +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 140, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 136, 54, 53), //personality +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 139, 53, 52), //statfs|fstatfs +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 153, 52, 51), //getpriority|setpriority|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|mlock|munlock|mlockall|munlockall +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 251, 25, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 206, 13, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 179, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 160, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 157, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 156, 46, 45), //pivot_root +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 159, 45, 44), //prctl|arch_prctl +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 162, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 161, 43, 42), //setrlimit +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 163, 42, 41), //sync +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 202, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 186, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 180, 39, 38), //quotactl +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 201, 38, 37), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 205, 37, 36), //futex|sched_setaffinity|sched_getaffinity +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 228, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 221, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 211, 33, 32), //io_setup|io_destroy|io_getevents|io_submit|io_cancel +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 220, 32, 31), //getdents64|set_tid_address|restart_syscall +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 227, 31, 30), //fadvise64|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 247, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 233, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 232, 27, 26), //fadvise64|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|exit_group -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 235, 26, 25), //epoll_ctl|tgkill -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 248, 25, 24), //waitid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 232, 28, 27), //clock_gettime|clock_getres|clock_nanosleep|exit_group +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 235, 27, 26), //epoll_ctl|tgkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 248, 26, 25), //waitid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 285, 13, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 275, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 257, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 254, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 253, 23, 22), //ioprio_set|ioprio_get -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 22, 21), //inotify_add_watch|inotify_rm_watch -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 302, 11, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 275, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 253, 21, 20), //ioprio_set|ioprio_get +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 20, 19), //inotify_add_watch|inotify_rm_watch BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 262, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 261, 17, 16), //openat|mkdirat|mknodat|fchownat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 273, 16, 15), //newfstatat|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 279, 15, 14), //splice|tee|sync_file_range|vmsplice -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 285, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 283, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 282, 12, 11), //utimensat|epoll_pwait -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 284, 11, 10), //timerfd_create -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 300, 10, 9), //fallocate|timerfd_settime|timerfd_gettime|accept4|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|recvmmsg -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 322, 5, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 314, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 305, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 303, 6, 5), //prlimit64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 312, 5, 4), //clock_adjtime|syncfs|sendmmsg|setns|getcpu|process_vm_readv|process_vm_writev -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 320, 4, 3), //sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 325, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 261, 18, 17), //openat|mkdirat|mknodat|fchownat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 273, 17, 16), //newfstatat|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 283, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 279, 14, 13), //splice|tee|sync_file_range|vmsplice +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 282, 13, 12), //utimensat|epoll_pwait +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 284, 12, 11), //timerfd_create +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 314, 5, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 306, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 302, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 300, 8, 7), //fallocate|timerfd_settime|timerfd_gettime|accept4|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|recvmmsg +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 303, 7, 6), //prlimit64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 312, 6, 5), //syncfs|sendmmsg|setns|getcpu|process_vm_readv|process_vm_writev +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 325, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 322, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 320, 3, 2), //sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 323, 2, 1), //execveat BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 329, 1, 0), //mlock2|copy_file_range|preadv2|pwritev2 BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), diff --git a/libc/seccomp/x86_app_policy.cpp b/libc/seccomp/x86_app_policy.cpp index 2db23680d9..5131efac2b 100644 --- a/libc/seccomp/x86_app_policy.cpp +++ b/libc/seccomp/x86_app_policy.cpp @@ -5,116 +5,124 @@ #include "seccomp_bpfs.h" const sock_filter x86_app_filter[] = { -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 116), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 131, 57, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 66, 29, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 124), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 150, 61, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 77, 31, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 41, 15, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 24, 7, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 10, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 8, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 7, 109, 108), //restart_syscall|exit|fork|read|write|open|close -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 9, 108, 107), //creat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 7, 117, 116), //restart_syscall|exit|fork|read|write|open|close +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 9, 116, 115), //creat BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 19, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 13, 106, 105), //unlink|execve|chdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 22, 105, 104), //lseek|getpid|mount +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 13, 114, 113), //unlink|execve|chdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 21, 113, 112), //lseek|getpid BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 33, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 26, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 25, 102, 101), //getuid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 27, 101, 100), //ptrace +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 25, 110, 109), //getuid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 27, 109, 108), //ptrace BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 36, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 34, 99, 98), //access -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 40, 98, 97), //sync|kill|rename|mkdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 51, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 34, 107, 106), //access +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 40, 106, 105), //sync|kill|rename|mkdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 60, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 54, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 45, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 94, 93), //dup|pipe|times -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 46, 93, 92), //brk -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 54, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 53, 91, 90), //acct|umount2 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 56, 90, 89), //ioctl|fcntl -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 63, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 60, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 87, 86), //setpgid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 62, 86, 85), //umask|chroot -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 65, 85, 84), //dup2|getppid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 96, 13, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 88, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 77, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 74, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 68, 80, 79), //setsid|sigaction -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 76, 79, 78), //sethostname|setrlimit +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 102, 101), //dup|pipe|times +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 46, 101, 100), //brk +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 56, 99, 98), //ioctl|fcntl +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 98, 97), //setpgid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 66, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 63, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 61, 95, 94), //umask +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 65, 94, 93), //dup2|getppid +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 75, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 68, 92, 91), //setsid|sigaction +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 76, 91, 90), //setrlimit +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 116, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 96, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 90, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 85, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 80, 77, 76), //getrusage|gettimeofday|settimeofday -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 86, 76, 75), //readlink -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 90, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 89, 73, 72), //reboot -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 72, 71), //mmap|munmap|truncate -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 71, 70), //fchmod -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 118, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 114, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 79, 86, 85), //getrusage|gettimeofday +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 86, 85, 84), //readlink +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 83, 82), //mmap|munmap|truncate +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 82, 81), //fchmod +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 104, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 102, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 98, 67, 66), //getpriority|setpriority -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 106, 66, 65), //socketcall|syslog|setitimer|getitimer -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 116, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 115, 64, 63), //wait4 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 117, 63, 62), //sysinfo -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 128, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 124, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 123, 60, 59), //fsync|sigreturn|clone|setdomainname|uname -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 126, 59, 58), //adjtimex|mprotect -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 130, 58, 57), //init_module|delete_module -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 272, 29, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 199, 15, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 168, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 138, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 98, 79, 78), //getpriority|setpriority +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 103, 78, 77), //socketcall +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 114, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 106, 76, 75), //setitimer|getitimer +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 115, 75, 74), //wait4 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 131, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 122, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 118, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 117, 71, 70), //sysinfo +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 121, 70, 69), //fsync|sigreturn|clone +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 125, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 123, 68, 67), //uname +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 126, 67, 66), //mprotect +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 140, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 136, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 134, 52, 51), //quotactl|getpgid|fchdir -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 51, 50), //personality -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 150, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 149, 49, 48), //setfsuid|setfsgid|_llseek|getdents|_newselect|flock|msync|readv|writev|getsid|fdatasync -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 164, 48, 47), //mlock|munlock|mlockall|munlockall|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|nanosleep|mremap -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 183, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 169, 45, 44), //poll -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 182, 44, 43), //prctl|rt_sigreturn|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|pread64|pwrite64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 134, 64, 63), //quotactl|getpgid|fchdir +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 63, 62), //personality +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 149, 62, 61), //_llseek|getdents|_newselect|flock|msync|readv|writev|getsid|fdatasync +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 265, 31, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 207, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 186, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 168, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 164, 56, 55), //mlock|munlock|mlockall|munlockall|sched_setparam|sched_getparam|sched_setscheduler|sched_getscheduler|sched_yield|sched_get_priority_max|sched_get_priority_min|sched_rr_get_interval|nanosleep|mremap +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 169, 55, 54), //poll +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 183, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 182, 53, 52), //prctl|rt_sigreturn|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|pread64|pwrite64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 185, 52, 51), //getcwd|capget +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 199, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 190, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 188, 42, 41), //getcwd|capget|capset|sigaltstack|sendfile -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 198, 41, 40), //vfork|ugetrlimit|mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 245, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 218, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 213, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 212, 37, 36), //getuid32|getgid32|geteuid32|getegid32|setreuid32|setregid32|getgroups32|setgroups32|fchown32|setresuid32|getresuid32|setresgid32|getresgid32 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 215, 36, 35), //setuid32|setgid32 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 224, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 222, 34, 33), //mincore|madvise|getdents64|fcntl64 -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 244, 33, 32), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64|futex|sched_setaffinity|sched_getaffinity|set_thread_area -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 254, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 252, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 250, 30, 29), //io_setup|io_destroy|io_getevents|io_submit|io_cancel -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 253, 29, 28), //exit_group -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 271, 28, 27), //epoll_create|epoll_ctl|epoll_wait|remap_file_pages|set_tid_address|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|statfs64|fstatfs64|tgkill -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 322, 13, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 300, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 291, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 284, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 273, 23, 22), //fadvise64_64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 188, 49, 48), //sigaltstack|sendfile +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 198, 48, 47), //vfork|ugetrlimit|mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 204, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 203, 46, 45), //getuid32|getgid32|geteuid32|getegid32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 206, 45, 44), //setregid32|getgroups32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 224, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 211, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 209, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 208, 41, 40), //fchown32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 210, 40, 39), //getresuid32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 218, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 212, 38, 37), //getresgid32 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 222, 37, 36), //mincore|madvise|getdents64|fcntl64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 252, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 245, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 244, 34, 33), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64|futex|sched_setaffinity|sched_getaffinity|set_thread_area +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 250, 33, 32), //io_setup|io_destroy|io_getevents|io_submit|io_cancel +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 254, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 253, 31, 30), //exit_group +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 264, 30, 29), //epoll_create|epoll_ctl|epoll_wait|remap_file_pages|set_tid_address|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 322, 15, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 295, 7, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 284, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 272, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 271, 25, 24), //clock_gettime|clock_getres|clock_nanosleep|statfs64|fstatfs64|tgkill +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 273, 24, 23), //fadvise64_64 +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 291, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 285, 22, 21), //waitid -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 295, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 294, 20, 19), //inotify_init|inotify_add_watch|inotify_rm_watch -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 299, 19, 18), //openat|mkdirat|mknodat|fchownat -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 318, 3, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 313, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 311, 16, 15), //fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 294, 21, 20), //inotify_init|inotify_add_watch|inotify_rm_watch +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 313, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 300, 1, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 299, 18, 17), //openat|mkdirat|mknodat|fchownat +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 311, 17, 16), //fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 318, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 317, 15, 14), //splice|sync_file_range|tee|vmsplice BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 321, 14, 13), //getcpu|epoll_pwait|utimensat BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 351, 7, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 343, 3, 0), +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 344, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 340, 1, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 337, 10, 9), //timerfd_create|eventfd|fallocate|timerfd_settime|timerfd_gettime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 341, 9, 8), //prlimit64 BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 346, 1, 0), -BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 345, 7, 6), //clock_adjtime|syncfs +BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 345, 7, 6), //syncfs BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 349, 6, 5), //setns|process_vm_readv|process_vm_writev BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 376, 3, 0), BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 358, 1, 0), diff --git a/libc/tools/genseccomp.py b/libc/tools/genseccomp.py index dad911331f..63d9f20e7c 100755 --- a/libc/tools/genseccomp.py +++ b/libc/tools/genseccomp.py @@ -192,7 +192,9 @@ def construct_bpf(names, architecture, header_dir, extra_switches, "whitelists": [ "SECCOMP_WHITELIST_COMMON.TXT", "SECCOMP_WHITELIST_APP.TXT"], - "blacklists": ["SECCOMP_BLACKLIST_COMMON.TXT"] + "blacklists": [ + "SECCOMP_BLACKLIST_COMMON.TXT", + "SECCOMP_BLACKLIST_APP.TXT"] } ANDROID_GLOBAL_SYSCALL_FILES = {