seccomp: allow mode setting across threads
authorKees Cook <keescook@chromium.org>
Fri, 27 Jun 2014 22:01:35 +0000 (15:01 -0700)
committerJP Abgrall <jpa@google.com>
Thu, 28 Aug 2014 01:53:49 +0000 (01:53 +0000)
commitd92472791131c6809f21142a8bf75c72cff6ee19
treeced62f1bb6724ac83dedb78703285e8eab074310
parent743266ae255c44edeb50911c191bf8083ea683dc
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>
Conflicts:
kernel/seccomp.c

Change-Id: I091ffa55d8f4e83ff02558a55e2b4dc76ac26905
kernel/seccomp.c