Re: [PATCH v3 12/35] x86/bugs: Restructure retbleed mitigation

Brendan Jackman
2025-02-10T18:35:19Z

On Wed, 8 Jan 2025 at 21:29, David Kaplan <david.kaplan@amd.com> wrote:
> @@ -1827,16 +1821,6 @@ static void __init spectre_v2_select_mitigation(void)
> break;
> }
>
> - if (IS_ENABLED(CONFIG_MITIGATION_IBRS_ENTRY) &&
> - boot_cpu_has_bug(X86_BUG_RETBLEED) &&
> - retbleed_cmd != RETBLEED_CMD_OFF &&
> - retbleed_cmd != RETBLEED_CMD_STUFF &&
> - boot_cpu_has(X86_FEATURE_IBRS) &&
> - boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) {
> - mode = SPECTRE_V2_IBRS;
> - break;
> - }
> -
> mode = spectre_v2_select_retpoline();
> break;

It isn't quite clear why this gets removed here. Doesn't
retbleed_update_mitigation() still depend on this?

It gets added back in 15/35 so this would be at most a problem of git history.