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: <20250210222508.4ezkw4g33i4j42u7@jpoimboe>
Date: Mon, 10 Feb 2025 14:25:08 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: David Kaplan <david.kaplan@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
	Peter Zijlstra <peterz@...radead.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 v3 04/35] x86/bugs: Restructure mds mitigation

On Wed, Jan 08, 2025 at 02:24:44PM -0600, David Kaplan wrote:
> @@ -229,9 +259,6 @@ static void x86_amd_ssb_disable(void)
>  		wrmsrl(MSR_AMD64_LS_CFG, msrval);
>  }
>  
> -#undef pr_fmt
> -#define pr_fmt(fmt)	"MDS: " fmt
> -

Why?  For consistency with the rest of the file it's best to leave the
correct pr_fmt() in place for mds_*(), taa_*(), rfds_*(), etc.

>  static void __init mds_select_mitigation(void)
>  {
> -	if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off()) {
> +	if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off())
>  		mds_mitigation = MDS_MITIGATION_OFF;
> -		return;
> -	}

For clarity it should still return here, that makes it obvious none of
the subsequent conditions apply.

> +static void __init mds_apply_mitigation(void)
> +{
> +	if (mds_mitigation == MDS_MITIGATION_FULL) {
> +		setup_force_cpu_cap(X86_FEATURE_CLEAR_CPU_BUF);

The mitigation still needs to be attempted for the MDS_MITIGATION_VMWERV
case.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ