x86/speculation/mds: Clear CPU buffers on exit to user
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>
Showing
- Documentation/x86/mds.rst 52 additions, 0 deletionsDocumentation/x86/mds.rst
- arch/x86/entry/common.c 3 additions, 0 deletionsarch/x86/entry/common.c
- arch/x86/include/asm/nospec-branch.h 13 additions, 0 deletionsarch/x86/include/asm/nospec-branch.h
- arch/x86/kernel/cpu/bugs.c 3 additions, 0 deletionsarch/x86/kernel/cpu/bugs.c
- arch/x86/kernel/nmi.c 4 additions, 0 deletionsarch/x86/kernel/nmi.c
- arch/x86/kernel/traps.c 8 additions, 0 deletionsarch/x86/kernel/traps.c
Loading
Please register or sign in to comment