nospec: Allow getting/setting on non-current task
authorKees Cook <keescook@chromium.org>
Tue, 1 May 2018 22:19:04 +0000 (15:19 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 3 Oct 2018 03:09:42 +0000 (04:09 +0100)
commit6b065a1d23b27cc826b1f86b01c800d9a86efb71
tree401493e99fc186d7cc64d9eae673745070f9a16b
parent4781d92a0499db5f1840bf1570960e68c4872c3d
nospec: Allow getting/setting on non-current task

commit 7bbf1373e228840bb0295a2ca26d548ef37f448e upstream.

Adjust arch_prctl_get/set_spec_ctrl() to operate on tasks other than
current.

This is needed both for /proc/$pid/status queries and for seccomp (since
thread-syncing can trigger seccomp in non-current threads).

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kernel/cpu/bugs.c
include/linux/nospec.h
kernel/sys.c