lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250109164033.bv3lnitv4jat43r3@desk>
Date: Thu, 9 Jan 2025 08:40:33 -0800
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: "Kaplan, David" <David.Kaplan@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"x86@...nel.org" <x86@...nel.org>,
	"H . Peter Anvin" <hpa@...or.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 12/35] x86/bugs: Restructure retbleed mitigation

On Thu, Jan 09, 2025 at 03:26:58PM +0000, Kaplan, David wrote:
> The intent was never to allow AUTO to persist, it should always be turned
> into a real mitigation.  However it looks like I did miss a case there,
> where if the mitigation is AUTO when retbleed_select_mitigation() is
> called, the bug should be mitigated but the vendor isn't AMD/Hygon, it
> wasn't being transformed.
> 
> I'll figure out how to fix this to match the existing functionality,
> thanks for pointing this out.

Also, adding a guard to ensure AUTO never persists would be good.

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 5bc2782f4ce1..ad63b5678250 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1383,6 +1383,9 @@ static void __init retbleed_update_mitigation(void)
 		}
 	}
 out:
+	if (retbleed_mitigation == RETBLEED_MITIGATION_AUTO)
+		retbleed_mitigation = RETBLEED_MITIGATION_NONE;
+
 	pr_info("%s\n", retbleed_strings[retbleed_mitigation]);
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ