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

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

Bug: 28020023
Patchset: seccomp

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