seccomp: allow mode setting across threads

This changes the mode setting helper to allow threads to change the
seccomp mode from another thread. We must maintain barriers to keep
TIF_SECCOMP synchronized with the rest of the seccomp state.

Signed-off-by: Kees Cook <>
Reviewed-by: Oleg Nesterov <>
Reviewed-by: Andy Lutomirski <>

1 file changed