]> git.baikalelectronics.ru Git - kernel.git/commit
x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value
authorPeter Zijlstra <peterz@infradead.org>
Mon, 3 Oct 2022 13:10:11 +0000 (10:10 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2022 07:16:54 +0000 (09:16 +0200)
commitd05ff54d0c65f588b82a013585d35a778815540a
treea27c22d16b88be8cf655f7b5573c096d34c29fbb
parentb6547a0d62e051c5306a3ca58170f6103c3f7155
x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value

commit 42ea9ad4d4e472b7a52cb99f8453fa22bc46d475 upstream.

Due to TIF_SSBD and TIF_SPEC_IB the actual IA32_SPEC_CTRL value can
differ from x86_spec_ctrl_base. As such, keep a per-CPU value
reflecting the current task's MSR content.

  [jpoimboe: rename]

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/nospec-branch.h
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/process.c