]> git.baikalelectronics.ru Git - kernel.git/commit
seccomp: Move speculation migitation control to arch code
authorThomas Gleixner <tglx@linutronix.de>
Fri, 4 May 2018 13:12:06 +0000 (15:12 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 4 May 2018 22:51:44 +0000 (00:51 +0200)
commitc5a34eebd861543846f856e05d7cd19e8dde9eed
treeac991511615d563b0141782cba95fc2482a68afc
parent76e5b63db388f9436e0283ede3e002563e64f3b6
seccomp: Move speculation migitation control to arch code

The migitation control is simpler to implement in architecture code as it
avoids the extra function call to check the mode. Aside of that having an
explicit seccomp enabled mode in the architecture mitigations would require
even more workarounds.

Move it into architecture code and provide a weak function in the seccomp
code. Remove the 'which' argument as this allows the architecture to decide
which mitigations are relevant for seccomp.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/bugs.c
include/linux/nospec.h
kernel/seccomp.c