Skip to content

Commit e41b0f4

Browse files
committed
seccomp: update "@default" seccomp group a bit
Let's add more of the most basic operations to "@default" as absolute baseline needed by glibc and such to operate. Specifically: futex, get_robust_list, get_thread_area, membarrier, set_robust_list, set_thread_area, set_tid_address are all required to properly implement mutexes and other thread synchronization logic. Given that a ton of datastructures are protected by mutexes (such as stdio and such), let's just whitelist this by default, so that things can just work. restart_syscall is used to implement EAGAIN SA_RESTART stuff in some archs, and synthesized by the kernel without any explicit user logic, hence let's make this work out of the box.
1 parent dbbf424 commit e41b0f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/shared/seccomp-util.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,19 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
278278
"execve\0"
279279
"exit\0"
280280
"exit_group\0"
281+
"futex\0"
282+
"get_robust_list\0"
283+
"get_thread_area\0"
281284
"getrlimit\0" /* make sure processes can query stack size and such */
282285
"gettimeofday\0"
286+
"membarrier\0"
283287
"nanosleep\0"
284288
"pause\0"
289+
"restart_syscall\0"
285290
"rt_sigreturn\0"
291+
"set_robust_list\0"
292+
"set_thread_area\0"
293+
"set_tid_address\0"
286294
"sigreturn\0"
287295
"time\0"
288296
},

0 commit comments

Comments
 (0)