blob: cf76f195ebecc1fabb90fd1a91906d43fd2be481 [file] [log] [blame]
# 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 EMRight FW updater
# tool. The updater EMRight_FWupdate should only be used through minijail with
# these rules.
# TODO: replace "ioctl: 1" with arg1 list when seccomp support bytecode filter.
# Because we encode buffer size in the arg1, so it's hard to list all the arg
# values use in the updater code, you can fix it in the future.
# All the values of arg1 are generate by macros HIDIOCSFEATURE(size) and
# HIDIOCGFEATURE(size) defined at linux/hidraw.h.
arch_prctl: arg0 == 0x1002
pipe2: 1
wait4: 1
restart_syscall: 1
rt_sigreturn: 1
exit: 1
exit_group: 1
select: 1
pselect6: 1
brk: 1
fcntl: 1
open: 1
close: 1
read: 1
write: 1
ioctl: 1
stat: 1
fstat: 1
newfstatat: 1
lseek: 1
readlink: 1
unlink: 1
access: 1
uname: 1
getdents: 1
getdents64: 1
time: 1
gettimeofday: 1
openat: 1
dup2: 1
mmap: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
mprotect: arg2 in ~PROT_EXEC || arg2 in ~PROT_WRITE
rt_sigaction: 1
nanosleep: 1
clock_nanosleep: 1
set_robust_list: 1
munmap: 1
rt_sigprocmask: 1
prlimit64: 1
set_tid_address: 1
getpid: 1
geteuid: 1
getppid: 1
fstatfs: 1