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: <20250306165757.sh6azitvazhq5lxj@desk>
Date: Thu, 6 Mar 2025 08:57:57 -0800
From: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
	Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	daniel.sneddon@...ux.intel.com, tony.luck@...el.com,
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
	linux-perf-users@...r.kernel.org,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
	"Liang, Kan" <kan.liang@...ux.intel.com>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	Brice Goglin <brice.goglin@...il.com>,
	Mario Limonciello <mario.limonciello@....com>,
	Perry Yuan <Perry.Yuan@....com>,
	Dapeng Mi <dapeng1.mi@...ux.intel.com>
Subject: Re: [PATCH v6 4/5] x86/bugs: Declutter vulnerable CPU list

On Thu, Mar 06, 2025 at 07:18:55AM -0800, Dave Hansen wrote:
> On 3/5/25 23:13, Pawan Gupta wrote:
> ...
> >  #define VULNWL_INTEL(vfm, whitelist)		\
> > -	X86_MATCH_VFM(vfm, whitelist)
> > +	X86_MATCH_VFM(INTEL_##vfm, whitelist)
> 
> I think the new VFM code may have thrown you off here. Doing HASWELL_X
> is not as nice as INTEL_HASWELL_X because, while you can grep for it, it
> won't work when you're looking for full identifiers like with ctags or
> cscope.
> 
> Also, this is just putting the "INTEL" in the macro instead of the VFM.
> I'm not sure there's much value in doing:
> 
> 	VULNWL_INTEL(ALDERLAKE_L, ...)	
> 
> over:
> 
> 	X86_MATCH_VFM(INTEL_ALDERLAKE_L, ...)

Ahh, right. I will fix that. Thanks for pointing this out.

As one of the goal of the patch is to shorten the macro names and follow
the VULNWL_<> pattern, would it make sense to rename VULNWL_INTEL to:

#define VULNWL_VFM(vfm, whitelist)		\
	X86_MATCH_VFM(vfm, whitelist)

Then the table would look like:

	VULNWL_VFM(INTEL_TIGERLAKE,	NO_MMIO),

Simlarly for cpu_vuln_blacklist the macros become:

#define VULNBL_VFM(vfm, issues)			\
	VULNBL_VFM_STEPS(vfm, X86_STEP_MAX, issues)

#define VULNBL_VFM_STEPS(vfm, max_stepping, issues)		   \
	X86_MATCH_VFM_STEPS(vfm, X86_STEP_MIN, max_stepping, issues)

#define VULNBL_VFM_TYPE(vfm, cpu_type, issues)			\
	X86_MATCH_VFM_CPU_TYPE(vfm,				\
			       INTEL_CPU_TYPE_##cpu_type,	\
			       issues)

And the table would look like:

	VULNBL_VFM(INTEL_COMETLAKE,			MMIO | MMIO_SBDS | RETBLEED | GDS),
	VULNBL_VFM_STEPS(INTEL_COMETLAKE_L,	0x0,	MMIO | RETBLEED),
	...
	VULNBL_VFM_TYPE(INTEL_ALDERLAKE,	ATOM,	RFDS),

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ