RE: [PATCH v4 04/36] x86/bugs: Restructure rfds mitigation

From: Kaplan, David
Date: Mon Apr 14 2025 - 15:18:44 EST


[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> Sent: Thursday, April 10, 2025 11:25 AM
> To: Kaplan, David <David.Kaplan@xxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>; Borislav Petkov <bp@xxxxxxxxx>;
> Peter Zijlstra <peterz@xxxxxxxxxxxxx>; Pawan Gupta
> <pawan.kumar.gupta@xxxxxxxxxxxxxxx>; Ingo Molnar <mingo@xxxxxxxxxx>; Dave
> Hansen <dave.hansen@xxxxxxxxxxxxxxx>; x86@xxxxxxxxxx; H . Peter Anvin
> <hpa@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; Brendan Jackman
> <jackmanb@xxxxxxxxxx>; Derek Manwaring <derekmn@xxxxxxxxxx>
> Subject: Re: [PATCH v4 04/36] x86/bugs: Restructure rfds mitigation
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Mon, Mar 10, 2025 at 11:39:51AM -0500, David Kaplan wrote:
> > static void __init rfds_select_mitigation(void) {
> > if (!boot_cpu_has_bug(X86_BUG_RFDS) || cpu_mitigations_off()) {
> > rfds_mitigation = RFDS_MITIGATION_OFF;
> > return;
> > }
> > - if (rfds_mitigation == RFDS_MITIGATION_OFF)
> > - return;
>
> The removal of this RFDS_MITIGATION_OFF check can cause
> verw_mitigation_selected to get wrongly enabled below if it was
> RFDS_MITIGATION_OFF to begin with.
>
> I think it's only a bisection issue, that gets re-added later with
> "x86/bugs: Add attack vector controls for rfds".
>

Ah, good catch. Will fix.

Thanks --David Kaplan