Re: [PATCH v3 07/35] x86/bugs: Restructure rfds mitigation

From: Josh Poimboeuf
Date: Mon Feb 10 2025 - 18:36:32 EST


On Wed, Jan 08, 2025 at 02:24:47PM -0600, David Kaplan wrote:
> @@ -627,11 +630,28 @@ static void __init rfds_select_mitigation(void)
>
> if (rfds_mitigation == RFDS_MITIGATION_AUTO)
> rfds_mitigation = RFDS_MITIGATION_VERW;

Another superfluous return above this one.

> +static void __init rfds_apply_mitigation(void)
> +{
> + if (rfds_mitigation == RFDS_MITIGATION_VERW)
> setup_force_cpu_cap(X86_FEATURE_CLEAR_CPU_BUF);
> - else
> - rfds_mitigation = RFDS_MITIGATION_UCODE_NEEDED;

Hm, unlike the other VERW mitigations, this doesn't even attempt to do
VERW on missing ucode.

Ah well, it was already like that and I doubt anybody cares at this
point.

--
Josh