diff options
author | Michael Pratt <mpratt@google.com> | 2021-09-30 08:43:12 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-30 08:46:04 -0700 |
commit | b4d4f4bd861c98feb0e28d637ef701b9f7f1840e (patch) | |
tree | a3e2e5595132b817eec2ce3806c212b03d2d741c /runsc | |
parent | db88937abb462b5dee6bcc2ec6d26367bf90ef7c (diff) |
Add timer_create and timer_settime to filters
Go 1.18 (as of golang.org/cl/324129) uses per-thread timers created and set
with timer_create/timer_settime for more accurate CPU pprof profiling.
Add these syscalls to the allowed syscall filters.
PiperOrigin-RevId: 399941561
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/boot/filter/config.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runsc/boot/filter/config.go b/runsc/boot/filter/config.go index 703f34827..d875aa334 100644 --- a/runsc/boot/filter/config.go +++ b/runsc/boot/filter/config.go @@ -304,6 +304,22 @@ var allowedSyscalls = seccomp.SyscallRules{ seccomp.EqualTo(unix.SPLICE_F_NONBLOCK), /* flags */ }, }, + unix.SYS_TIMER_CREATE: []seccomp.Rule{ + { + seccomp.EqualTo(unix.CLOCK_THREAD_CPUTIME_ID), /* which */ + seccomp.MatchAny{}, /* sevp */ + seccomp.MatchAny{}, /* timerid */ + }, + }, + unix.SYS_TIMER_DELETE: []seccomp.Rule{}, + unix.SYS_TIMER_SETTIME: []seccomp.Rule{ + { + seccomp.MatchAny{}, /* timerid */ + seccomp.EqualTo(0), /* flags */ + seccomp.MatchAny{}, /* new_value */ + seccomp.EqualTo(0), /* old_value */ + }, + }, unix.SYS_TGKILL: []seccomp.Rule{ { seccomp.EqualTo(uint64(os.Getpid())), |