| # Copyright 2020 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # This file lists out the seccomp policy for allowed syscalls on arc-adbd |
| # when it works with arcvm |
| |
| # mmap should only be allowed in READ mode. |
| mmap: arg2 in 0xfffffffb || arg2 in 0xfffffffd |
| stat: 1 |
| # mprotect should only be allowed in READ mode. |
| mprotect: arg2 in 0xfffffffb || arg2 in 0xfffffffd |
| close: 1 |
| open: 1 |
| openat: 1 |
| read: 1 |
| fstat: 1 |
| write: 1 |
| creat: 1 |
| access: 1 |
| gettid:1 |
| futex:1 |
| setpriority: 1 |
| getuid:1 |
| geteuid:1 |
| getgid:1 |
| getegid:1 |
| epoll_create1:1 |
| epoll_ctl: 1 |
| epoll_wait: 1 |
| pipe2:1 |
| |
| # Mount should only be MS_NOSUID|MS_NODEV|MS_NOEXEC. |
| mount: arg3 == 0xe |
| brk: 1 |
| mkdir: 1 |
| lstat: 1 |
| rt_sigaction: 1 |
| getdents: 1 |
| exit: 1 |
| exit_group: 1 |
| rt_sigprocmask: 1 |
| munmap: 1 |
| tgkill: 1 |
| sendto: 1 |
| |
| # For modprobe(8) |
| clone: 1 |
| execve: 1 |
| wait4: 1 |
| set_robust_list: 1 |
| dup2: 1 |
| getrlimit: 1 |
| getdents64: 1 |
| prctl: 1 |
| arch_prctl: 1 |
| uname: 1 |
| newfstatat: 1 |
| fcntl: 1 |
| lseek: 1 |
| finit_module: 1 |
| |
| # For brillo::kLogToStderrIfTty. isatty(0) calls ioctl(0, TCGETS, *). |
| ioctl: arg0 == 0 && arg1 == TCGETS |
| getpid: 1 |
| prlimit64: arg2 == 0 && arg3 != 0 |
| |
| # For syslog /dev/log and connection to the socket of adb_proxy |
| socket: arg0 == AF_INET && arg1 == SOCK_STREAM || arg0 == AF_UNIX |
| connect: 1 |