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: <Z877c2pAEYQ8SjCW@lx-t490>
Date: Mon, 10 Mar 2025 15:47:15 +0100
From: "Ahmed S. Darwish" <darwi@...utronix.de>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Cooper <andrew.cooper3@...rix.com>, x86@...nel.org,
	John Ogness <john.ogness@...utronix.de>, x86-cpuid@...ts.linux.dev,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 10/12] tools/x86/kcpuid: Update bitfields to
 x86-cpuid-db v2.0

Hi!

On Fri, 07 Mar 2025, H. Peter Anvin wrote:
>
> On Fri, 07 Mar 2025, Ahmed S. Darwish wrote
> >
> > Thanks, I missed that Pentium III can provide leaf 0x3 as well.
> >
> > It seems that leaf 0x3's format differs between Intel and Transmeta.
> > On Intel, PSN is at ECX:EDX, while on Transmeta, the PSN is at
> > EAX:EBX, and ECX:EDX on non-evaluation models provide the rest. [*]
> >
> > Unfortunately, so far, x86-cpuid-db does not support having a CPUID
> > bitfield with different interpretations across vendors.
> >
> > Given that Linux force disables PSN at early boot, I'll just remove
> > that leaf from the database — for now.  (Time wise, finishing the new
> > linux/arch/x86/ CPUID data model for mainline submission is a much
> > higher priority.)
> >
>
> You can simply output the 128 bits as is. Some vendors will have zeroes
> in some of the fields, but it doesn't matter.
>

The x86-cpuid-db schema works on a register-by-register basis.  For
example, here is db/xml/leaf_03.xml (with Intel added as a vendor):

|  <leaf id="0x3">
|    <desc>Processor Serial Number (PSN)</desc>
|    <text>
|      If PSN is disabled, the returned register values are zero.
|    </text>
|    <vendors>
|      <vendor>Intel</vendor>
|      <vendor>Transmeta</vendor>
|    </vendors>
|    <subleaf id="0">
|      <eax>...</eax>
|      <ebx>...</ebx>
|      <ecx>...</ecx>
|      <edx>...</edx>
|    </subleaf>
|  </leaf>

Adding support for a one-shot EAX-EBX-ECX-EDX 128-bit range is definitely
doable, but it will require changes to the project's XML schema.  And
given the output format change, the kcpuid CSV file generator and the C99
bitfields header file generator will also need to be changed.

It is doable of course: in no way I'd like to set the project "in stone."
But it's more work than what meets the eye, for a very low-priority leaf.

Thanks!

--
Ahmed S. Darwish
Linutronix GmbH

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ