/linux/arch/x86/kvm/vmx/ |
H A D | vmx_ops.h | diff 07853adc29a058c5fd143c14e5ac528448a72ed9 Tue Jun 14 23:16:16 CEST 2022 Josh Poimboeuf <jpoimboe@kernel.org> KVM: VMX: Prevent RSB underflow before vmenter
On VMX, there are some balanced returns between the time the guest's SPEC_CTRL value is written, and the vmenter.
Balanced returns (matched by a preceding call) are usually ok, but it's at least theoretically possible an NMI with a deep call stack could empty the RSB before one of the returns.
For maximum paranoia, don't allow *any* returns (balanced or otherwise) between the SPEC_CTRL write and the vmenter.
[ bp: Fix 32-bit build. ]
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>
|
H A D | vmenter.S | diff 07853adc29a058c5fd143c14e5ac528448a72ed9 Tue Jun 14 23:16:16 CEST 2022 Josh Poimboeuf <jpoimboe@kernel.org> KVM: VMX: Prevent RSB underflow before vmenter
On VMX, there are some balanced returns between the time the guest's SPEC_CTRL value is written, and the vmenter.
Balanced returns (matched by a preceding call) are usually ok, but it's at least theoretically possible an NMI with a deep call stack could empty the RSB before one of the returns.
For maximum paranoia, don't allow *any* returns (balanced or otherwise) between the SPEC_CTRL write and the vmenter.
[ bp: Fix 32-bit build. ]
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>
|
H A D | capabilities.h | diff 07853adc29a058c5fd143c14e5ac528448a72ed9 Tue Jun 14 23:16:16 CEST 2022 Josh Poimboeuf <jpoimboe@kernel.org> KVM: VMX: Prevent RSB underflow before vmenter
On VMX, there are some balanced returns between the time the guest's SPEC_CTRL value is written, and the vmenter.
Balanced returns (matched by a preceding call) are usually ok, but it's at least theoretically possible an NMI with a deep call stack could empty the RSB before one of the returns.
For maximum paranoia, don't allow *any* returns (balanced or otherwise) between the SPEC_CTRL write and the vmenter.
[ bp: Fix 32-bit build. ]
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>
|
H A D | vmx.h | diff 07853adc29a058c5fd143c14e5ac528448a72ed9 Tue Jun 14 23:16:16 CEST 2022 Josh Poimboeuf <jpoimboe@kernel.org> KVM: VMX: Prevent RSB underflow before vmenter
On VMX, there are some balanced returns between the time the guest's SPEC_CTRL value is written, and the vmenter.
Balanced returns (matched by a preceding call) are usually ok, but it's at least theoretically possible an NMI with a deep call stack could empty the RSB before one of the returns.
For maximum paranoia, don't allow *any* returns (balanced or otherwise) between the SPEC_CTRL write and the vmenter.
[ bp: Fix 32-bit build. ]
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>
|
H A D | vmx.c | diff 07853adc29a058c5fd143c14e5ac528448a72ed9 Tue Jun 14 23:16:16 CEST 2022 Josh Poimboeuf <jpoimboe@kernel.org> KVM: VMX: Prevent RSB underflow before vmenter
On VMX, there are some balanced returns between the time the guest's SPEC_CTRL value is written, and the vmenter.
Balanced returns (matched by a preceding call) are usually ok, but it's at least theoretically possible an NMI with a deep call stack could empty the RSB before one of the returns.
For maximum paranoia, don't allow *any* returns (balanced or otherwise) between the SPEC_CTRL write and the vmenter.
[ bp: Fix 32-bit build. ]
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>
|
/linux/arch/x86/kernel/ |
H A D | asm-offsets.c | diff 07853adc29a058c5fd143c14e5ac528448a72ed9 Tue Jun 14 23:16:16 CEST 2022 Josh Poimboeuf <jpoimboe@kernel.org> KVM: VMX: Prevent RSB underflow before vmenter
On VMX, there are some balanced returns between the time the guest's SPEC_CTRL value is written, and the vmenter.
Balanced returns (matched by a preceding call) are usually ok, but it's at least theoretically possible an NMI with a deep call stack could empty the RSB before one of the returns.
For maximum paranoia, don't allow *any* returns (balanced or otherwise) between the SPEC_CTRL write and the vmenter.
[ bp: Fix 32-bit build. ]
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>
|
/linux/arch/x86/kernel/cpu/ |
H A D | bugs.c | diff 07853adc29a058c5fd143c14e5ac528448a72ed9 Tue Jun 14 23:16:16 CEST 2022 Josh Poimboeuf <jpoimboe@kernel.org> KVM: VMX: Prevent RSB underflow before vmenter
On VMX, there are some balanced returns between the time the guest's SPEC_CTRL value is written, and the vmenter.
Balanced returns (matched by a preceding call) are usually ok, but it's at least theoretically possible an NMI with a deep call stack could empty the RSB before one of the returns.
For maximum paranoia, don't allow *any* returns (balanced or otherwise) between the SPEC_CTRL write and the vmenter.
[ bp: Fix 32-bit build. ]
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>
|