RE: [PATCH v2 4/5] x86/bugs: Add attack vector controls for SSB
From: Kaplan, David
Date: Wed Aug 27 2025 - 10:25:41 EST
[AMD Official Use Only - AMD Internal Distribution Only]
> -----Original Message-----
> From: Borislav Petkov <bp@xxxxxxxxx>
> Sent: Wednesday, August 27, 2025 9:22 AM
> To: Kaplan, David <David.Kaplan@xxxxxxx>
> Cc: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>; Thomas Gleixner
> <tglx@xxxxxxxxxxxxx>; Peter Zijlstra <peterz@xxxxxxxxxxxxx>; Josh Poimboeuf
> <jpoimboe@xxxxxxxxxx>; Ingo Molnar <mingo@xxxxxxxxxx>; Dave Hansen
> <dave.hansen@xxxxxxxxxxxxxxx>; x86@xxxxxxxxxx; H . Peter Anvin
> <hpa@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 4/5] x86/bugs: Add attack vector controls for SSB
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Wed, Aug 27, 2025 at 02:05:14PM +0000, Kaplan, David wrote:
> > If you really want to not pick up patch #3 yet, then you could move the
> > should_mitigate_vuln() check into the switch statement for
> > SPEC_STORE_BYPASS_CMD_AUTO only. Or just pick up the clean-up patch
> which
> > also reduces the overall code size.
>
> I need a minimal fix which goes into 6.17 now because we forgot SSB. This
> patch was my attempt at doing something like that.
>
> Cleanups can then go ontop.
>
Ok. Then I would go with the suggestion in my reply...move the should_mitigate_vuln() logic into the SPEC_STORE_BYPASS_CMD_AUTO branch of the switch. I think that should work as expected.
Rest of the patch was fine I think.
--David Kaplan