x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value
authorPeter Zijlstra <peterz@infradead.org>
Tue, 14 Jun 2022 21:15:52 +0000 (23:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jul 2022 10:54:02 +0000 (12:54 +0200)
commitfac1b0007cec8335f47b01358f352a9bdd72f7fb
treef0cc44e0d78b292594a604c0311230bc46dffd79
parentb4e05ea71edaf52f2ecef675407a82160176ac54
x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value

commit caa0ff24d5d0e02abce5e65c3d2b7f20a6617be5 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