github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/executor/android/x86_system_policy.h (about)

     1  // Copyright 2022 syzkaller project authors. All rights reserved.
     2  // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  // File autogenerated by genseccomp.py from Android U - edit at your peril!!
     5  
     6  const struct sock_filter x86_system_filter[] = {
     7      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 0, 0, 134),
     8      BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 240, 132, 0), // futex
     9      BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 54, 131, 0), // ioctl
    10      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 183, 65, 0),
    11      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 88, 33, 0),
    12      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 51, 17, 0),
    13      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 36, 9, 0),
    14      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 19, 5, 0),
    15      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 11, 3, 0),
    16      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 3, 1, 0),
    17      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 2, 124, 123), // restart_syscall|exit
    18      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 7, 123, 122), // read|write|open|close
    19      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 13, 122, 121), // execve|chdir
    20      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 26, 1, 0),
    21      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 22, 120, 119), // lseek|getpid|mount
    22      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 27, 119, 118), // ptrace
    23      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 43, 3, 0),
    24      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 41, 1, 0),
    25      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 38, 116, 115), // sync|kill
    26      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 42, 115, 114), // dup
    27      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 45, 1, 0),
    28      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 44, 113, 112), // times
    29      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 46, 112, 111), // brk
    30      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 66, 7, 0),
    31      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 60, 3, 0),
    32      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 57, 1, 0),
    33      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 53, 108, 107), // acct|umount2
    34      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 58, 107, 106), // setpgid
    35      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 64, 1, 0),
    36      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 62, 105, 104), // umask|chroot
    37      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 65, 104, 103), // getppid
    38      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 77, 3, 0),
    39      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 74, 1, 0),
    40      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 68, 101, 100), // setsid|sigaction
    41      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 76, 100, 99), // sethostname|setrlimit
    42      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 85, 1, 0),
    43      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 80, 98, 97), // getrusage|gettimeofday|settimeofday
    44      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 86, 97, 96), // readlink
    45      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 124, 15, 0),
    46      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 102, 7, 0),
    47      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 94, 3, 0),
    48      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 91, 1, 0),
    49      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 89, 92, 91), // reboot
    50      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 93, 91, 90), // munmap|truncate
    51      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 96, 1, 0),
    52      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 95, 89, 88), // fchmod
    53      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 98, 88, 87), // getpriority|setpriority
    54      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 116, 3, 0),
    55      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 114, 1, 0),
    56      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 107, 85, 84), // socketcall|syslog|setitimer|getitimer|stat
    57      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 115, 84, 83), // wait4
    58      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 118, 1, 0),
    59      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 117, 82, 81), // sysinfo
    60      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 123, 81, 80), // fsync|sigreturn|clone|setdomainname|uname
    61      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 140, 7, 0),
    62      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 131, 3, 0),
    63      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 128, 1, 0),
    64      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 126, 77, 76), // adjtimex|mprotect
    65      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 130, 76, 75), // init_module|delete_module
    66      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 136, 1, 0),
    67      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 134, 74, 73), // quotactl|getpgid|fchdir
    68      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 137, 73, 72), // personality
    69      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 150, 3, 0),
    70      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 143, 1, 0),
    71      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 141, 70, 69), //_llseek
    72      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 149, 69, 68), // flock|msync|readv|writev|getsid|fdatasync
    73      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 172, 1, 0),
    74      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 164, 67, 66), // 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
    75      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
    76      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 303, 33, 0),
    77      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 252, 17, 0),
    78      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 218, 9, 0),
    79      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 199, 5, 0),
    80      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 197, 3, 0),
    81      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 190, 1, 0),
    82      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 188, 59, 58), // getcwd|capget|capset|sigaltstack|sendfile
    83      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 196, 58, 57), // vfork|ugetrlimit|mmap2|truncate64|ftruncate64|stat64
    84      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 198, 57, 56), // fstat64
    85      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 213, 1, 0),
    86      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 212, 55, 54), // getuid32|getgid32|geteuid32|getegid32|setreuid32|setregid32|getgroups32|setgroups32|fchown32|setresuid32|getresuid32|setresgid32|getresgid32
    87      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 217, 54, 53), // setuid32|setgid32|setfsuid32|setfsgid32
    88      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 241, 3, 0),
    89      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 224, 1, 0),
    90      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 222, 51, 50), // mincore|madvise|getdents64|fcntl64
    91      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 240, 50, 49), // gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64
    92      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 245, 1, 0),
    93      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 244, 48, 47), // sched_setaffinity|sched_getaffinity|set_thread_area
    94      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 250, 47, 46), // io_setup|io_destroy|io_getevents|io_submit|io_cancel
    95      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 284, 7, 0),
    96      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 258, 3, 0),
    97      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 255, 1, 0),
    98      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 253, 43, 42), // exit_group
    99      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 256, 42, 41), // epoll_ctl
   100      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 272, 1, 0),
   101      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 271, 40, 39), // set_tid_address|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete|clock_settime|clock_gettime|clock_getres|clock_nanosleep|statfs64|fstatfs64|tgkill
   102      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 273, 39, 38), // fadvise64_64
   103      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 295, 3, 0),
   104      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 292, 1, 0),
   105      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 285, 36, 35), // waitid
   106      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 294, 35, 34), // inotify_add_watch|inotify_rm_watch
   107      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 300, 1, 0),
   108      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 299, 33, 32), // openat|mkdirat|mknodat|fchownat
   109      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 302, 32, 31), // fstatat64|unlinkat
   110      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 374, 15, 0),
   111      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 340, 7, 0),
   112      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 322, 3, 0),
   113      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 318, 1, 0),
   114      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 317, 27, 26), // linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare|set_robust_list|get_robust_list|splice|sync_file_range|tee|vmsplice
   115      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 321, 26, 25), // getcpu|epoll_pwait|utimensat
   116      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 324, 1, 0),
   117      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 323, 24, 23), // timerfd_create
   118      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 337, 23, 22), // fallocate|timerfd_settime|timerfd_gettime|signalfd4|eventfd2|epoll_create1|dup3|pipe2|inotify_init1|preadv|pwritev|rt_tgsigqueueinfo|perf_event_open
   119      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 346, 3, 0),
   120      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 343, 1, 0),
   121      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 341, 20, 19), // prlimit64
   122      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 345, 19, 18), // clock_adjtime|syncfs
   123      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 351, 1, 0),
   124      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 349, 17, 16), // setns|process_vm_readv|process_vm_writev
   125      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 359, 16, 15), // sched_setattr|sched_getattr|renameat2|seccomp|getrandom|memfd_create|bpf|execveat
   126      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 421, 7, 0),
   127      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 403, 3, 0),
   128      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 383, 1, 0),
   129      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 380, 12, 11), // userfaultfd|membarrier|mlock2|copy_file_range|preadv2|pwritev2
   130      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 384, 11, 10), // statx
   131      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 417, 1, 0),
   132      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 415, 9, 8), // clock_gettime64|clock_settime64|clock_adjtime64|clock_getres_time64|clock_nanosleep_time64|timer_gettime64|timer_settime64|timerfd_gettime64|timerfd_settime64|utimensat_time64|pselect6_time64|ppoll_time64
   133      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 418, 8, 7), // recvmmsg_time64
   134      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 438, 3, 0),
   135      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 434, 1, 0),
   136      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 425, 5, 4), // rt_sigtimedwait_time64|futex_time64|sched_rr_get_interval_time64|pidfd_send_signal
   137      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 437, 4, 3), // pidfd_open|clone3|close_range
   138      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 440, 1, 0),
   139      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 439, 2, 1), // pidfd_getfd
   140      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 441, 1, 0), // process_madvise
   141      BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
   142  };
   143  
   144  #define x86_system_filter_size (sizeof(x86_system_filter) / sizeof(struct sock_filter))