Re: [PATCH 04/22] x86/srso: Fix SBPB enablement for spec_rstack_overflow=off

From: Borislav Petkov
Date: Tue Aug 22 2023 - 02:07:06 EST


On Tue, Aug 22, 2023 at 07:54:52AM +0200, Borislav Petkov wrote:
> If you goto pred_cmd, you will overwrite it with PRED_CMD_SBPB here.

Looking at this more:

"If SRSO mitigation is not required or is disabled, software may use
SBPB on context/virtual machine switch to help protect against
vulnerabilities like Spectre v2."

I think we actually want this overwrite to happen.

But then if retbleed=ibpb, entry_ibpb() will do bit 0 unconditionally...

Hmm, lemme talk to people.

--
Regards/Gruss,
Boris.

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