summaryrefslogtreecommitdiffstats
path: root/src/shared/seccomp-util.c
diff options
context:
space:
mode:
authorLion Yang <lion@aosc.io>2018-07-02 22:58:01 +0200
committerLennart Poettering <lennart@poettering.net>2018-07-03 13:35:02 +0200
commita9518dc36925ddca4d13ee46f3e78c46f0f4851a (patch)
tree5514da9907041663b87ff3b9358f3a85562c0b8b /src/shared/seccomp-util.c
parenttree-wide: add a space after (void) (diff)
downloadsystemd-a9518dc36925ddca4d13ee46f3e78c46f0f4851a.tar.xz
systemd-a9518dc36925ddca4d13ee46f3e78c46f0f4851a.zip
seccomp: add swapcontext into @process for ppc32
There are some modern programming languages use userspace context switches to implement coroutine features. PowerPC (32-bit) needs syscall "swapcontext" to get contexts or switch between contexts, which is special. Adding this rule should fix #9485.
Diffstat (limited to '')
-rw-r--r--src/shared/seccomp-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c
index c433cb90dc..ade3c656af 100644
--- a/src/shared/seccomp-util.c
+++ b/src/shared/seccomp-util.c
@@ -651,6 +651,7 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
"rt_sigqueueinfo\0"
"rt_tgsigqueueinfo\0"
"setns\0"
+ "swapcontext\0" /* Some archs e.g. powerpc32 are using it to do userspace context switches */
"tgkill\0"
"times\0"
"tkill\0"