prctl: Add force disable speculation
authorThomas Gleixner <tglx@linutronix.de>
Thu, 3 May 2018 20:09:15 +0000 (22:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 May 2018 16:54:04 +0000 (18:54 +0200)
commit20d036a2e223a5c4327bcf432ef995f59f51d1d1
tree4d79c308f3c9af554bdcef4a8afe4e004b8476a7
parentc024722ffecd484fcb35ad61e822c214b6913196
prctl: Add force disable speculation

commit 356e4bfff2c5489e016fdb925adbf12a1e3950ee upstream

For certain use cases it is desired to enforce mitigations so they cannot
be undone afterwards. That's important for loader stubs which want to
prevent a child from disabling the mitigation again. Will also be used for
seccomp(). The extra state preserving of the prctl state for SSB is a
preparatory step for EBPF dymanic speculation control.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/userspace-api/spec_ctrl.rst
arch/x86/kernel/cpu/bugs.c
fs/proc/array.c
include/linux/sched.h
include/uapi/linux/prctl.h