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] [day] [month] [year] [list]
Message-ID:
 <LV3PR12MB92650F008E4BBB480CF987AD943DA@LV3PR12MB9265.namprd12.prod.outlook.com>
Date: Fri, 22 Aug 2025 14:37:09 +0000
From: "Kaplan, David" <David.Kaplan@....com>
To: Borislav Petkov <bp@...en8.de>
CC: Thomas Gleixner <tglx@...utronix.de>, Peter Zijlstra
	<peterz@...radead.org>, Josh Poimboeuf <jpoimboe@...nel.org>, Pawan Gupta
	<pawan.kumar.gupta@...ux.intel.com>, 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 v2 2/5] x86/bugs: Use early_param for spectre_v2

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Borislav Petkov <bp@...en8.de>
> Sent: Friday, August 22, 2025 9:30 AM
> To: Kaplan, David <David.Kaplan@....com>
> Cc: Thomas Gleixner <tglx@...utronix.de>; Peter Zijlstra <peterz@...radead.org>;
> Josh Poimboeuf <jpoimboe@...nel.org>; Pawan Gupta
> <pawan.kumar.gupta@...ux.intel.com>; Ingo Molnar <mingo@...hat.com>; Dave
> Hansen <dave.hansen@...ux.intel.com>; x86@...nel.org; H . Peter Anvin
> <hpa@...or.com>; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v2 2/5] x86/bugs: Use early_param for spectre_v2
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Fri, Aug 22, 2025 at 02:12:55PM +0000, Kaplan, David wrote:
> > It could, but I felt this was a way to logically separate the code vs having
> > one giant function.  All the code in spectre_v2_check_cmd() does one thing:
> > verifies if the chosen command is possible on this system.  The rest of
> > spectre_v2_select_mitigation() then uses the cmd to actually pick
> > a mitigation.
> >
> > Since these were two distinct flows, I thought having a separate function
> > made sense to make the code more readable.  But that was just my opinion,
> > I won't object if you want to inline it.
>
> Right, since we're making all the mitigations handling uniform, I'd prefer to
> have the same code pattern here too. The function does get a bit big but it is
> clear that it does two things: (1) checks the command before it (2) selects
> the mitigation. And the others do the same so...
>

Sort of.  Spectre_v2 is a bit unique is that it is more complicated than almost any other ones in terms of the number of options it has.  There are 11 command line options for spectre_v2, the next closest one has 7.  Spectre_v2 (and spectre_v2_user) are the only remaining mitigations where a 'cmd' is initially chosen instead of a mitigation because of all this complexity and checks that have to occur.

--David Kaplan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ