[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZNb1EpG1GDzRspPB@google.com>
Date: Fri, 11 Aug 2023 19:57:22 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: "Mika Penttilä" <mpenttil@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, Srikanth Aithal <sraithal@....com>,
kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH] x86/retpoline: Don't clobber RFLAGS during srso_safe_ret()
On Fri, Aug 11, 2023, Mika Penttilä wrote:
> > @@ -252,11 +252,10 @@ SYM_START(srso_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
> > .byte 0x48, 0xb8
> > SYM_INNER_LABEL(srso_safe_ret, SYM_L_GLOBAL)
> > - add $8, %_ASM_SP
> > + lea 8(%_ASM_SP), %_ASM_SP
> > ret
> > int3
> > int3
> > - int3
> > lfence
> > call srso_safe_ret
> > int3
> >
> > base-commit: 25aa0bebba72b318e71fe205bfd1236550cc9534
>
> Don't we have the same kind of problems with __x86_return_skl ?
Yep, forcing that path via "retbleed=force retbleed=stuff spectre_v2=retpoline,generic"
yields the same failures. I have no idea how to go about cleanly fixing that.
The logic effectively requires modifying flags, the only thing I can think of is
to save/restore flags across the thunk, which seems beyond gross.
Given that no one has complained about this, I think I'd vote to simply disable
KVM if call depth tracking is being used.
Powered by blists - more mailing lists