Commit 83d4b193 authored by David Kaplan's avatar David Kaplan Committed by Borislav Petkov (AMD)
Browse files

x86/bugs: Allow retbleed=stuff only on Intel



The retbleed=stuff mitigation is only applicable for Intel CPUs affected
by retbleed.  If this option is selected for another vendor, print a
warning and fall back to the AUTO option.

Signed-off-by: default avatarDavid Kaplan <david.kaplan@amd.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/20250418161721.1855190-10-david.kaplan@amd.com
parent 46d5925b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1191,6 +1191,10 @@ static void __init retbleed_select_mitigation(void)
	case RETBLEED_CMD_STUFF:
		if (IS_ENABLED(CONFIG_MITIGATION_CALL_DEPTH_TRACKING) &&
		    spectre_v2_enabled == SPECTRE_V2_RETPOLINE) {
			if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) {
				pr_err("WARNING: retbleed=stuff only supported for Intel CPUs.\n");
				goto do_cmd_auto;
			}
			retbleed_mitigation = RETBLEED_MITIGATION_STUFF;

		} else {