]> git.itanic.dy.fi Git - linux-stable/commit
x86/speculation/mds: Clear CPU buffers on exit to user
authorThomas Gleixner <tglx@linutronix.de>
Mon, 18 Feb 2019 22:42:51 +0000 (23:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 May 2019 17:15:29 +0000 (19:15 +0200)
commit186fcd64f1b03100da7b71125e4c2611252daa38
tree0b105829a8ed9307237309aeef39817ba897d610
parent5048b39b364922b291cb10516e6fb535bff5e51e
x86/speculation/mds: Clear CPU buffers on exit to user

commit 04dcbdb8057827b043b3c71aa397c4c63e67d086 upstream

Add a static key which controls the invocation of the CPU buffer clear
mechanism on exit to user space and add the call into
prepare_exit_to_usermode() and do_nmi() right before actually returning.

Add documentation which kernel to user space transition this covers and
explain why some corner cases are not mitigated.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Jon Masters <jcm@redhat.com>
Tested-by: Jon Masters <jcm@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/x86/mds.rst
arch/x86/entry/common.c
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/nmi.c
arch/x86/kernel/traps.c