seccomp: allow mode setting across threads
authorKees Cook <keescook@chromium.org>
Fri, 27 Jun 2014 22:01:35 +0000 (15:01 -0700)
committerKees Cook <keescook@chromium.org>
Fri, 18 Jul 2014 19:13:40 +0000 (12:13 -0700)
commit3ba2530cc06eb4aee4f1f754f43d781e8a12ee09
tree29a898621ce07eabf881ef40123f2882d7dccc1a
parentdbd952127d11bb44a4ea30b08cc60531b6a23d71
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 <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Andy Lutomirski <luto@amacapital.net>
kernel/seccomp.c