KVM: VMX: Prevent guest RSB poisoning attacks with eIBRS
On eIBRS systems, the returns in the vmexit return path from __vmx_vcpu_run() to vmx_vcpu_run() are exposed to RSB poisoning attacks. Fix that by moving the post-vmexit spec_ctrl handling to immediately after the vmexit. Signed-off-by:Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by:
Borislav Petkov <bp@suse.de>
Showing
- arch/x86/include/asm/nospec-branch.h 1 addition, 0 deletionsarch/x86/include/asm/nospec-branch.h
- arch/x86/kernel/cpu/bugs.c 4 additions, 0 deletionsarch/x86/kernel/cpu/bugs.c
- arch/x86/kvm/vmx/run_flags.h 1 addition, 0 deletionsarch/x86/kvm/vmx/run_flags.h
- arch/x86/kvm/vmx/vmenter.S 38 additions, 11 deletionsarch/x86/kvm/vmx/vmenter.S
- arch/x86/kvm/vmx/vmx.c 28 additions, 20 deletionsarch/x86/kvm/vmx/vmx.c
- arch/x86/kvm/vmx/vmx.h 1 addition, 0 deletionsarch/x86/kvm/vmx/vmx.h
Loading