Skip to content

Commit

Permalink
seccomp: add swapcontext into @process for ppc32
Browse files Browse the repository at this point in the history
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 systemd#9485.

(cherry picked from commit a9518dc)
  • Loading branch information
LionNatsu authored and keszybz committed Oct 28, 2018
1 parent b18f4b8 commit 184ab96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shared/seccomp-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 184ab96

Please sign in to comment.