blob: 6f7338d9072eda48fd54b30cd80652b581ed8427 [file] [edit]
# Copyright 2018 The ChromiumOS Authors
# 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 ml_service.
# rseq should be first due to frequency and purpose to decrease nptl latency
rseq: 1
brk: 1
clock_getres: 1
clock_gettime: 1
clock_nanosleep: 1
clone: 1
close: 1
connect: 1
epoll_create1: 1
epoll_ctl: 1
epoll_pwait: 1
eventfd2: 1
execve: 1
exit: 1
exit_group: 1
faccessat: 1
faccessat2: 1
fadvise64: 1
fcntl: 1
flock: 1
fstat: 1
fstatfs: 1
futex: 1
getcpu: 1
getdents64: 1
getegid: 1
geteuid: 1
getgid: 1
getpid: 1
getpriority: 1
getrandom: arg2 in ~GRND_RANDOM
getresgid: 1
getresuid: 1
getsockname: 1
gettid: 1
gettimeofday: 1
getuid: 1
# ioctl:
# HIDIOCGRDESCSIZE: 0x80044801
# HIDIOCGRDESC: 0x90044802
ioctl: arg1 == SIOCGIFFLAGS || arg1 == SIOCSIFFLAGS || arg1 == TCGETS || \
arg1 == 0x80044801 || arg1 == 0x90044802
kill: arg1 == SIGKILL
lseek: 1
madvise: 1
memfd_create: 1
mmap: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
mount: 1
mprotect: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
mremap: 1
munmap: 1
newfstatat: 1
openat: 1
pipe2: 1
ppoll: 1
prctl: 1
pread64: 1
prlimit64: 1
process_vm_readv: 1
pwrite64: 1
read: 1
readlinkat: 1
recvmsg: 1
restart_syscall: 1
rt_sigaction: 1
rt_sigprocmask: 1
rt_sigreturn: 1
rt_sigtimedwait: 1
sched_getaffinity: 1
sched_getparam: 1
sched_getscheduler: 1
sched_yield: 1
sendmsg: 1
sendto: 1
set_robust_list: 1
set_tid_address: 1
setgroups: 1
setresuid: 1
setsid: 1
shutdown: 1
sigaltstack: 1
signalfd4: 1
socket: arg0 == AF_UNIX
socketpair: 1
statx: 1
sysinfo: 1
tgkill: 1
umount2: 1
uname: 1
unshare: 1
wait4: 1
write: 1