Paul Lawrence | 89fa81f | 2017-02-17 10:22:03 -0800 | [diff] [blame] | 1 | // Autogenerated file - edit at your peril!! |
| 2 | |
| 3 | #include <linux/filter.h> |
| 4 | #include <errno.h> |
| 5 | |
| 6 | #include "seccomp_bpfs.h" |
| 7 | const sock_filter x86_64_filter[] = { |
Paul Lawrence | 3dd3d55 | 2017-04-12 10:02:54 -0700 | [diff] [blame^] | 8 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 0, 0, 82), |
| 9 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 169, 41, 0), |
| 10 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 79, 21, 0), |
| 11 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 35, 11, 0), |
Paul Lawrence | 89fa81f | 2017-02-17 10:22:03 -0800 | [diff] [blame] | 12 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 8, 5, 0), |
| 13 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 5, 3, 0), |
| 14 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 3, 1, 0), |
Paul Lawrence | 3dd3d55 | 2017-04-12 10:02:54 -0700 | [diff] [blame^] | 15 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 2, 75, 74), //read|write |
| 16 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 4, 74, 73), //close |
| 17 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 6, 73, 72), //fstat |
| 18 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 32, 3, 0), |
Paul Lawrence | 89fa81f | 2017-02-17 10:22:03 -0800 | [diff] [blame] | 19 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 24, 1, 0), |
Paul Lawrence | 3dd3d55 | 2017-04-12 10:02:54 -0700 | [diff] [blame^] | 20 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 21, 70, 69), //lseek|mmap|mprotect|munmap|brk|rt_sigaction|rt_sigprocmask|rt_sigreturn|ioctl|pread64|pwrite64|readv|writev |
| 21 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 29, 69, 68), //sched_yield|mremap|msync|mincore|madvise |
| 22 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 33, 68, 67), //dup |
| 23 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 58, 5, 0), |
| 24 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 44, 3, 0), |
| 25 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 38, 1, 0), |
| 26 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 37, 64, 63), //nanosleep|getitimer |
| 27 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 43, 63, 62), //setitimer|getpid|sendfile|socket|connect |
| 28 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 57, 62, 61), //sendto|recvfrom|sendmsg|recvmsg|shutdown|bind|listen|getsockname|getpeername|socketpair|setsockopt|getsockopt|clone |
| 29 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 72, 1, 0), |
| 30 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 64, 60, 59), //vfork|execve|exit|wait4|kill|uname |
| 31 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 78, 59, 58), //fcntl|flock|fsync|fdatasync|truncate|ftruncate |
| 32 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 135, 9, 0), |
| 33 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 95, 5, 0), |
| 34 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 93, 3, 0), |
| 35 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 91, 1, 0), |
| 36 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 82, 54, 53), //getcwd|chdir|fchdir |
| 37 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 92, 53, 52), //fchmod |
| 38 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 94, 52, 51), //fchown |
| 39 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 112, 1, 0), |
| 40 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 111, 50, 49), //umask|gettimeofday|getrlimit|getrusage|sysinfo|times|ptrace|getuid|syslog|getgid|setuid|setgid|geteuid|getegid|setpgid|getppid |
| 41 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 132, 49, 48), //setsid|setreuid|setregid|getgroups|setgroups|setresuid|getresuid|setresgid|getresgid|getpgid|setfsuid|setfsgid|getsid|capget|capset|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|sigaltstack |
| 42 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 155, 5, 0), |
| 43 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 140, 3, 0), |
| 44 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 137, 1, 0), |
| 45 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 136, 45, 44), //personality |
| 46 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 139, 44, 43), //statfs|fstatfs |
| 47 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 153, 43, 42), //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 |
| 48 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 157, 1, 0), |
| 49 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 156, 41, 40), //pivot_root |
| 50 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 167, 40, 39), //prctl|arch_prctl|adjtimex|setrlimit|chroot|sync|acct|settimeofday|mount|umount2 |
Paul Lawrence | 89fa81f | 2017-02-17 10:22:03 -0800 | [diff] [blame] | 51 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 254, 19, 0), |
| 52 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 217, 9, 0), |
| 53 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 186, 5, 0), |
| 54 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 179, 3, 0), |
| 55 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 175, 1, 0), |
Paul Lawrence | 3dd3d55 | 2017-04-12 10:02:54 -0700 | [diff] [blame^] | 56 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 172, 34, 33), //reboot|sethostname|setdomainname |
Paul Lawrence | 89fa81f | 2017-02-17 10:22:03 -0800 | [diff] [blame] | 57 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 177, 33, 32), //init_module|delete_module |
| 58 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 180, 32, 31), //quotactl |
| 59 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 202, 1, 0), |
| 60 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 201, 30, 29), //gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill |
| 61 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 205, 29, 28), //futex|sched_setaffinity|sched_getaffinity |
| 62 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 247, 5, 0), |
| 63 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 233, 3, 0), |
| 64 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 221, 1, 0), |
| 65 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 220, 25, 24), //getdents64|set_tid_address|restart_syscall |
| 66 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 232, 24, 23), //fadvise64|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|exit_group |
| 67 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 235, 23, 22), //epoll_ctl|tgkill |
| 68 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 251, 1, 0), |
| 69 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 248, 21, 20), //waitid |
| 70 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 253, 20, 19), //ioprio_set|ioprio_get |
| 71 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 283, 9, 0), |
| 72 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 275, 5, 0), |
| 73 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 262, 3, 0), |
| 74 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 257, 1, 0), |
| 75 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 15, 14), //inotify_add_watch|inotify_rm_watch |
| 76 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 261, 14, 13), //openat|mkdirat|mknodat|fchownat |
| 77 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 273, 13, 12), //newfstatat|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare |
| 78 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 280, 1, 0), |
| 79 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 279, 11, 10), //splice|tee|sync_file_range|vmsplice |
| 80 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 282, 10, 9), //utimensat|epoll_pwait |
| 81 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 305, 5, 0), |
| 82 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 302, 3, 0), |
| 83 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 285, 1, 0), |
| 84 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 284, 6, 5), //timerfd_create |
| 85 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 300, 5, 4), //fallocate|timerfd_settime|timerfd_gettime|accept4|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open|recvmmsg |
| 86 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 303, 4, 3), //prlimit64 |
| 87 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 317, 1, 0), |
| 88 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 312, 2, 1), //clock_adjtime|syncfs|sendmmsg|setns|getcpu|process_vm_readv|process_vm_writev |
| 89 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 319, 1, 0), //seccomp|getrandom |
| 90 | BPF_STMT(BPF_RET|BPF_K, SECCOMP_RET_ALLOW), |
| 91 | }; |
| 92 | |
| 93 | const size_t x86_64_filter_size = sizeof(x86_64_filter) / sizeof(struct sock_filter); |