Re: [PATCH] x86/bugs: Qualify RETBLEED_INTEL_MSG

From: Borislav Petkov

Date: Tue Oct 07 2025 - 18:13:05 EST


On Tue, Oct 07, 2025 at 11:22:57AM -0700, Pawan Gupta wrote:
> Even when CPU mitigations are disabled there is still some handling
> required for mitigations like GDS that requires a write to MSR to ensure
> correct behavior.

When mitigations are compiled out there are no mitigations by definition. So
whatever you're talking about must be something else which should happen in
vendor code.

> IMO, rather than targeting the mitigation enabling code it might make more
> sense to compile out the actual mitigations scattered accross the kernel.
> This may also improve performance by reducing the code footprint, and can
> also help getting a cleaner disassembly.

Probably... however, it needs to be done smartly because sprinkling ifdeffery
and turning what is an already unreadable mess into a bigger abomination,
won't fly. Perhaps split out the mitigations glue into separate compilation
units and build-disable them... we'll see.

--
Regards/Gruss,
Boris.

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