diff options
author | Michael Pratt <mpratt@google.com> | 2020-02-03 11:39:01 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-03 11:39:51 -0800 |
commit | 4d1a648c7c5db8a51416bff647260a1be3b5c12e (patch) | |
tree | 4e7c6af2574eb521bd636f06a3761c84e482ccb4 /runsc/boot | |
parent | 02997af5abd62d778fca4d01b047a6bdebab2090 (diff) |
Allow mlock in system call filters
Go 1.14 has a workaround for a Linux 5.2-5.4 bug which requires mlock'ing the g
stack to prevent register corruption. We need to allow this syscall until it is
removed from Go.
PiperOrigin-RevId: 292967478
Diffstat (limited to 'runsc/boot')
-rw-r--r-- | runsc/boot/filter/config.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runsc/boot/filter/config.go b/runsc/boot/filter/config.go index 4fb9adca6..f8d351c7b 100644 --- a/runsc/boot/filter/config.go +++ b/runsc/boot/filter/config.go @@ -174,6 +174,18 @@ var allowedSyscalls = seccomp.SyscallRules{ syscall.SYS_LSEEK: {}, syscall.SYS_MADVISE: {}, syscall.SYS_MINCORE: {}, + // Used by the Go runtime as a temporarily workaround for a Linux + // 5.2-5.4 bug. + // + // See src/runtime/os_linux_x86.go. + // + // TODO(b/148688965): Remove once this is gone from Go. + syscall.SYS_MLOCK: []seccomp.Rule{ + { + seccomp.AllowAny{}, + seccomp.AllowValue(4096), + }, + }, syscall.SYS_MMAP: []seccomp.Rule{ { seccomp.AllowAny{}, |