Skip to content

Commit adee2c7

Browse files
committed
seccomp: add support for "swapcontext" syscall in default policy
This system call is only available on 32- and 64-bit PowerPC, it is used by modern programming language implementations to implement coroutine features through userspace context switches. moby [1] and systemd nspawn [2] already whitelist this system call so it makes sense to whitelist it in containerd as well. [1]: moby/moby#43092 [2]: systemd/systemd#9487 Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
1 parent 3ccd43c commit adee2c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/seccomp/seccomp_default.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ func DefaultProfile(sp *specs.Spec) *specs.LinuxSeccomp {
467467
s.Syscalls = append(s.Syscalls, specs.LinuxSyscall{
468468
Names: []string{
469469
"sync_file_range2",
470+
"swapcontext",
470471
},
471472
Action: specs.ActAllow,
472473
Args: []specs.LinuxSeccompArg{},

0 commit comments

Comments
 (0)