mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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
This commit is contained in:
committed by
gVisor bot
parent
02997af5ab
commit
4d1a648c7c
@@ -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{},
|
||||
|
||||
Reference in New Issue
Block a user