| # Copyright 2019 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. |
| |
| # These seccomp rules specify only the syscalls used by the Melfas FW updater |
| # tool. The updater tool melfasfwupdate should only be used through |
| # minijail with these rules. |
| |
| # rseq should be first due to frequency and purpose to decrease nptl latency |
| rseq: 1 |
| |
| nanosleep: 1 |
| clock_nanosleep: 1 |
| futex: 1 |
| ioctl: arg1 == 0x0000540d || arg1 == 0x80087468 || arg1 == 0x80044801 || arg1 == 0x90044802 |
| timerfd_settime: 1 |
| poll: 1 |
| write: 1 |
| lstat: 1 |
| read: 1 |
| openat: 1 |
| close: 1 |
| fstat: 1 |
| newfstatat: 1 |
| getrandom: 1 |
| readlink: 1 |
| readlinkat: 1 |
| access: 1 |
| faccessat: 1 |
| faccessat2: 1 |
| mmap: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE |
| stat: 1 |
| mprotect: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE |
| rt_sigaction: 1 |
| getdents: 1 |
| getdents64: 1 |
| fcntl: 1 |
| brk: 1 |
| recvmsg: 1 |
| munmap: 1 |
| clone: 1 |
| set_robust_list: 1 |
| madvise: 1 |
| rt_sigprocmask: 1 |
| exit: 1 |
| pipe: 1 |
| setsockopt: 1 |
| execve: 1 |
| arch_prctl: 1 |
| getpid: 1 |
| uname: 1 |
| getsockname: 1 |
| gettid: 1 |
| timerfd_create: 1 |
| lseek: 1 |
| socket: arg0 == AF_NETLINK |
| exit_group: 1 |
| bind: 1 |
| getppid: 1 |
| geteuid: 1 |
| wait4: 1 |
| restart_syscall: 1 |
| prlimit64: 1 |
| set_tid_address: 1 |
| rt_sigreturn: 1 |
| fstatfs: 1 |