| # Copyright 2018 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. |
| |
| # The following are allowed syscalls for runtime_probe skeleton + DBus |
| write: 1 |
| getuid: 1 |
| geteuid: 1 |
| getgid: 1 |
| getegid: 1 |
| epoll_create1: 1 |
| pipe2: 1 |
| epoll_ctl: 1 |
| getpid: 1 |
| gettid: 1 |
| rt_sigprocmask: 1 |
| signalfd4: 1 |
| fstat: 1 |
| newfstatat: 1 |
| clock_getres: 1 |
| futex: 1 |
| getresuid: 1 |
| getresgid: 1 |
| fcntl: 1 |
| getsockname: 1 |
| poll: 1 |
| read: 1 |
| readlink: 1 |
| openat: 1 |
| set_robust_list: 1 |
| munmap: 1 |
| sendto: 1 |
| sendmsg: 1 |
| recvmsg: 1 |
| epoll_wait: 1 |
| close: 1 |
| exit: 1 |
| exit_group: 1 |
| restart_syscall: 1 |
| rt_sigreturn: 1 |
| stat: 1 |
| access: 1 |
| faccessat: 1 |
| faccessat2: 1 |
| mmap: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE |
| mprotect: arg2 == PROT_READ || arg2 == PROT_NONE |
| arch_prctl: 1 |
| rt_sigaction: 1 |
| set_tid_address: 1 |
| prlimit64: 1 |
| |
| # The following are syscalls enabled by -L in minijail. |
| # Document those syscalls here because runtime_probe daemon doesn't use -L by default. |
| socket: arg0 == AF_UNIX && arg1 == SOCK_DGRAM|SOCK_CLOEXEC && arg2 == 0 || arg0 == AF_UNIX && arg1 == SOCK_STREAM|SOCK_CLOEXEC && arg2 == 0 |
| lseek: 1 |
| connect: 1 |
| |
| # The following are syscalls specifically required for runtime_probe |
| # main daemon. |
| uname: 1 |
| lstat: 1 |
| brk: 1 |
| select: 1 |
| pselect6: 1 |
| |
| # For brillo::kLogToStderrIfTty. isatty(0) calls ioctl(0, TCGETS, *). |
| ioctl: arg0 == 0 && arg1 == TCGETS |
| fstatfs: 1 |