RE: [PATCH] x86/bugs: Qualify RETBLEED_INTEL_MSG

From: Kaplan, David

Date: Fri Oct 10 2025 - 15:27:41 EST


[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Sent: Friday, October 10, 2025 2:19 PM
> To: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>
> Cc: Borislav Petkov <bp@xxxxxxxxx>; Kaplan, David <David.Kaplan@xxxxxxx>;
> Thomas Gleixner <tglx@xxxxxxxxxxxxx>; Peter Zijlstra <peterz@xxxxxxxxxxxxx>; Ingo
> Molnar <mingo@xxxxxxxxxx>; Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>;
> x86@xxxxxxxxxx; H . Peter Anvin <hpa@xxxxxxxxx>; Klaus Kusche
> <klaus.kusche@xxxxxxxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] x86/bugs: Qualify RETBLEED_INTEL_MSG
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Fri, Oct 10, 2025 at 11:47:25AM -0700, Pawan Gupta wrote:
> > > Instead, CONFIG_MITIGATION_SPECTRE_V2 could enable a submenu which
> then
> > > allows the user to enable retpoline, IBRS on entry, etc, with each
> > > having help text describing what generations of CPUs it would be the
> > > default for, to help guide the user to choose sane defaults depending on
> > > their CPU:
> > >
> > > * CONFIG_MITIGATION_SPECTRE_V2
> > > * CONFIG_MITIGATION_SPECTRE_V2_RETPOLINE
> > > select CONFIG_BUILD_INDIRECT_THUNKS
> > > * CONFIG_MITIGATION_SPECTRE_V2_IBRS
> > > select CONFIG_BUILD_IBRS_ENTRY
> >
> > That would be good if a kernel is built for certain specific CPU(s). This
> > may not be ideal for distro kernels.
>
> Why not? A distro can just enable everything:
>
> CONFIG_MITIGATION_SPECTRE_V2=y
> CONFIG_MITIGATION_SPECTRE_V2_RETPOLINE=y
> CONFIG_MITIGATION_SPECTRE_V2_IBRS=y
>
> and then if/when some older HW ages out of being supported by the
> distro, they can start disabling things.
>

Is this really improving things?

There's already a lot of CONFIG options related to mitigations that make testing a pain, and this seems to just make it worse by now having even more options that may or may not make sense together.

I get the value in building a kernel with all mitigations disabled, although frankly I think that only makes sense if it's substantially better than just 'mitigations=off'. But is the cost of only building support for IBRS and not retpoline really buying much?

--David Kaplan