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: <Z_bCA8788lrr-NdB@gmail.com>
Date: Wed, 9 Apr 2025 20:52:51 +0200
From: Ingo Molnar <mingo@...nel.org>
To: "Ahmed S. Darwish" <darwi@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	John Ogness <john.ogness@...utronix.de>, x86@...nel.org,
	x86-cpuid@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] x86/cacheinfo: Properly parse CPUID(0x80000005)
 L1d/L1i associativity


* Ahmed S. Darwish <darwi@...utronix.de> wrote:

> For the AMD CPUID(4) emulation cache info logic, the same associativity
> mapping array, assocs[], is used for both CPUID(0x80000005) and
> CPUID(0x80000006).
> 
> This is incorrect since per the AMD manuals, the mappings for
> CPUID(0x80000005) L1d/L1i associativity is:
> 
>    n = 0x1 -> 0xfe	n
>    n = 0xff		fully associative
> 
> while assocs[] maps these values to:
> 
>    n = 0x1, 0x2, 0x4	n
>    n = 0x3, 0x7, 0x9	0
>    n = 0x6		8
>    n = 0x8		16
>    n = 0xa		32
>    n = 0xb		48
>    n = 0xc		64
>    n = 0xd		96
>    n = 0xe		128
>    n = 0xf		fully associative
> 
> which is only valid for CPUID(0x80000006).
> 
> Parse CPUID(0x80000005) L1d/L1i associativity values as shown in the AMD
> manuals.  Since the 0xffff literal is used to denote full associativity
> at the AMD CPUID(4)-emulation logic, define AMD_CPUID4_FULLY_ASSOCIATIVE
> for it instead of spreading that literal in more places.
> 
> Mark the assocs[] mapping array as only valid for CPUID(0x80000006) L2/L3
> cache information.
> 
> Fixes: a326e948c538 ("x86, cacheinfo: Fixup L3 cache information for AMD multi-node processors")
> Cc: stable@...r.kernel.org
> Signed-off-by: Ahmed S. Darwish <darwi@...utronix.de>

Yeah, so a Cc: stable tag is usually reserved for recent regressions, 
or critical fixes - but this is a bug from 2009, ~16 years old. This 
bug is old enough to receive a driving license in the US, and can 
legally buy beer or wine in Germany.

So I've removed the tags from the two commits in tip:x86/cpu, but note 
that the Fixes tag itself will give backporters enough information so 
they can decide on whether to backport. Greg's -stable process 
typically processes all Fixes tags for example, once Linus pulls this 
into v6.16-to-be.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ