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:
 <LV3PR12MB9265ABD1B81D759A618A20029438A@LV3PR12MB9265.namprd12.prod.outlook.com>
Date: Wed, 27 Aug 2025 15:47:10 +0000
From: "Kaplan, David" <David.Kaplan@....com>
To: Borislav Petkov <bp@...en8.de>
CC: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>, Thomas Gleixner
	<tglx@...utronix.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 v2 4/5] x86/bugs: Add attack vector controls for SSB

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Borislav Petkov <bp@...en8.de>
> Sent: Wednesday, August 27, 2025 10:34 AM
> To: Kaplan, David <David.Kaplan@....com>
> Cc: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>; Thomas Gleixner
> <tglx@...utronix.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; H . Peter Anvin
> <hpa@...or.com>; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v2 4/5] x86/bugs: Add attack vector controls for SSB
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Wed, Aug 27, 2025 at 02:25:26PM +0000, Kaplan, David wrote:
> > Ok.  Then I would go with the suggestion in my reply...move the
> > should_mitigate_vuln() logic into the SPEC_STORE_BYPASS_CMD_AUTO
> branch of
> > the switch.  I think that should work as expected.
>
> Makes sense...
>
> > Rest of the patch was fine I think.
>
> Here it is - I *think* it looks good now but doublecheck me again pls.
>
> Thx.
>
> --- a/arch/x86/include/asm/nospec-branch.h
> +++ b/arch/x86/include/asm/nospec-branch.h
> @@ -514,6 +514,7 @@ enum spectre_v2_user_mitigation {
>  /* The Speculative Store Bypass disable variants */
>  enum ssb_mitigation {
>         SPEC_STORE_BYPASS_NONE,
> +       SPEC_STORE_BYPASS_AUTO,
>         SPEC_STORE_BYPASS_DISABLE,
>         SPEC_STORE_BYPASS_PRCTL,
>         SPEC_STORE_BYPASS_SECCOMP,

After reviewing this further, this change should be removed.  The AUTO mitigation is intended to say 'choose based on attack vector', but with this patch you're not looking at ssb_mode to decide to do that.  You're looking at the ssb mitigation cmd (which already defaults to SPEC_STORE_BYPASS_CMD_AUTO).  Therefore there is no need for a SPEC_STORE_BYPASS_AUTO setting of ssb_mode.

(The clean-up patch removes ssb_mitigation_cmd entirely, so it needs an AUTO setting of ssb_mitigation)

>
> -static enum ssb_mitigation ssb_mode __ro_after_init =
> SPEC_STORE_BYPASS_NONE;
> +static enum ssb_mitigation ssb_mode __ro_after_init =
> +       IS_ENABLED(CONFIG_MITIGATION_SSB) ?
> SPEC_STORE_BYPASS_AUTO : SPEC_STORE_BYPASS_NONE;
>

But more importantly, please remove this.  That's because in the current patch, if the user says 'nospec_store_bypass_disable' then the ssb_select_mitigation() function does not change ssb_mode.  So it needs to default to NONE.

Thanks
--David Kaplan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ