BACKPORT: sched: move no_new_privs into new atomic flags

Since seccomp transitions between threads requires updates to the
no_new_privs flag to be atomic, the flag must be part of an atomic flag
set. This moves the nnp flag into a separate task field, and introduces
accessors.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Andy Lutomirski <luto@amacapital.net>

Bug: 28020023
Patchset: seccomp

(cherry picked from kernel/msm commit 8334b709bf3e12d90aba715742df9e1d5aa2eb7f)
Signed-off-by: Kees Cook <keescook@google.com>
Change-Id: I36ce9af17118e69d8664be67b17a94a459ed5144
5 files changed