github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/executor/android/x86_app_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_app_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, 172, 65, 0),
    11      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 85, 33, 0),
    12      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 45, 17, 0),
    13      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 26, 9, 0),
    14      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 19, 5, 0),
    15      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 10, 3, 0),
    16      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 8, 1, 0),
    17      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 7, 124, 123), // restart_syscall|exit|fork|read|write|open|close
    18      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 9, 123, 122), // creat
    19      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 13, 122, 121), // unlink|execve|chdir
    20      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 24, 1, 0),
    21      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 21, 120, 119), // lseek|getpid
    22      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 25, 119, 118), // getuid
    23      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 36, 3, 0),
    24      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 33, 1, 0),
    25      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 27, 116, 115), // ptrace
    26      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 34, 115, 114), // access
    27      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 41, 1, 0),
    28      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 40, 113, 112), // sync|kill|rename|mkdir
    29      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 44, 112, 111), // dup|pipe|times
    30      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 63, 7, 0),
    31      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 57, 3, 0),
    32      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 55, 1, 0),
    33      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 46, 108, 107), // brk
    34      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 56, 107, 106), // fcntl
    35      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 60, 1, 0),
    36      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 58, 105, 104), // setpgid
    37      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 61, 104, 103), // umask
    38      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 75, 3, 0),
    39      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 66, 1, 0),
    40      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 65, 101, 100), // dup2|getppid
    41      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 68, 100, 99), // setsid|sigaction
    42      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 77, 1, 0),
    43      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 76, 98, 97), // setrlimit
    44      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 79, 97, 96), // getrusage|gettimeofday
    45      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 118, 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, 90, 1, 0),
    49      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 86, 92, 91), // readlink
    50      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 93, 91, 90), // mmap|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, 114, 3, 0),
    55      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 104, 1, 0),
    56      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 103, 85, 84), // socketcall
    57      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 107, 84, 83), // setitimer|getitimer|stat
    58      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 116, 1, 0),
    59      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 115, 82, 81), // wait4
    60      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 117, 81, 80), // sysinfo
    61      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 136, 7, 0),
    62      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 125, 3, 0),
    63      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 122, 1, 0),
    64      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 121, 77, 76), // fsync|sigreturn|clone
    65      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 123, 76, 75), // uname
    66      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 131, 1, 0),
    67      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 126, 74, 73), // mprotect
    68      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 134, 73, 72), // quotactl|getpgid|fchdir
    69      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 150, 3, 0),
    70      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 140, 1, 0),
    71      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 137, 70, 69), // personality
    72      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 149, 69, 68), //_llseek|getdents|_newselect|flock|msync|readv|writev|getsid|fdatasync
    73      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 168, 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, 169, 66, 65), // poll
    76      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 295, 33, 0),
    77      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 241, 17, 0),
    78      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 207, 9, 0),
    79      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 199, 5, 0),
    80      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 190, 3, 0),
    81      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 183, 1, 0),
    82      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 182, 59, 58), // prctl|rt_sigreturn|rt_sigaction|rt_sigprocmask|rt_sigpending|rt_sigtimedwait|rt_sigqueueinfo|rt_sigsuspend|pread64|pwrite64
    83      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 188, 58, 57), // getcwd|capget|capset|sigaltstack|sendfile
    84      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 198, 57, 56), // vfork|ugetrlimit|mmap2|truncate64|ftruncate64|stat64|lstat64|fstat64
    85      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 205, 1, 0),
    86      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 203, 55, 54), // getuid32|getgid32|geteuid32|getegid32
    87      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 206, 54, 53), // getgroups32
    88      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 218, 3, 0),
    89      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 211, 1, 0),
    90      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 210, 51, 50), // fchown32|setresuid32|getresuid32
    91      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 212, 50, 49), // getresgid32
    92      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 224, 1, 0),
    93      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 222, 48, 47), // mincore|madvise|getdents64|fcntl64
    94      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 240, 47, 46), // gettid|readahead|setxattr|lsetxattr|fsetxattr|getxattr|lgetxattr|fgetxattr|listxattr|llistxattr|flistxattr|removexattr|lremovexattr|fremovexattr|tkill|sendfile64
    95      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 265, 7, 0),
    96      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 252, 3, 0),
    97      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 245, 1, 0),
    98      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 244, 43, 42), // sched_setaffinity|sched_getaffinity|set_thread_area
    99      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 250, 42, 41), // io_setup|io_destroy|io_getevents|io_submit|io_cancel
   100      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 254, 1, 0),
   101      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 253, 40, 39), // exit_group
   102      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 264, 39, 38), // epoll_create|epoll_ctl|epoll_wait|remap_file_pages|set_tid_address|timer_create|timer_settime|timer_gettime|timer_getoverrun|timer_delete
   103      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 284, 3, 0),
   104      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 272, 1, 0),
   105      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 271, 36, 35), // clock_gettime|clock_getres|clock_nanosleep|statfs64|fstatfs64|tgkill
   106      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 273, 35, 34), // fadvise64_64
   107      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 291, 1, 0),
   108      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 285, 33, 32), // waitid
   109      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 294, 32, 31), // inotify_init|inotify_add_watch|inotify_rm_watch
   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, 318, 3, 0),
   113      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 300, 1, 0),
   114      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 299, 27, 26), // openat|mkdirat|mknodat|fchownat
   115      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 317, 26, 25), // fstatat64|unlinkat|renameat|linkat|symlinkat|readlinkat|fchmodat|faccessat|pselect6|ppoll|unshare|set_robust_list|get_robust_list|splice|sync_file_range|tee|vmsplice
   116      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 322, 1, 0),
   117      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 321, 24, 23), // getcpu|epoll_pwait|utimensat
   118      BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, 337, 23, 22), // timerfd_create|eventfd|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, 344, 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), // 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_app_filter_size (sizeof(x86_app_filter) / sizeof(struct sock_filter))