diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-06-14 23:15:52 +0200 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-06-27 10:33:59 +0200 |
commit | caa0ff24d5d0e02abce5e65c3d2b7f20a6617be5 (patch) | |
tree | 39290109cf141e2276936764ff738924cec26c2b /arch/x86/kernel/process.c | |
parent | x86/bugs: Enable STIBP for JMP2RET (diff) | |
download | linux-caa0ff24d5d0e02abce5e65c3d2b7f20a6617be5.tar.xz linux-caa0ff24d5d0e02abce5e65c3d2b7f20a6617be5.zip |
x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value
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>
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 9b2772b7e1f3..05611f66d013 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -600,7 +600,7 @@ static __always_inline void __speculation_ctrl_update(unsigned long tifp, } if (updmsr) - wrmsrl(MSR_IA32_SPEC_CTRL, msr); + write_spec_ctrl_current(msr); } static unsigned long speculation_ctrl_update_tif(struct task_struct *tsk) |