Re: Hang when booting guest kernels compiled with clang after SRSO mitigations

From: Borislav Petkov
Date: Fri Aug 11 2023 - 06:15:38 EST


On Thu, Aug 10, 2023 at 09:14:14AM -0700, Nathan Chancellor wrote:
> Not sure how helpful that will be...

Yeah, not really. More wild guesses: if you uncomment the UNTRAIN_RET in
__svm_vcpu_run() on the host, does that have any effect? Diff below.

Also, can you send me the host and guest .configs and the compilers
you've used so that I can try to reproduce here exactly what you have?

Thx.

---
diff --git a/arch/x86/kvm/svm/vmenter.S b/arch/x86/kvm/svm/vmenter.S
index 265452fc9ebe..b5871259a973 100644
--- a/arch/x86/kvm/svm/vmenter.S
+++ b/arch/x86/kvm/svm/vmenter.S
@@ -222,7 +222,7 @@ SYM_FUNC_START(__svm_vcpu_run)
* because interrupt handlers won't sanitize 'ret' if the return is
* from the kernel.
*/
- UNTRAIN_RET
+// UNTRAIN_RET

/* SRSO */
ALTERNATIVE "", "call entry_ibpb", X86_FEATURE_IBPB_ON_VMEXIT


--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette