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-next>] [day] [month] [year] [list]
Message-ID: <ZpkckA2SHa1r3Bor@lx-t490>
Date: Thu, 18 Jul 2024 15:45:52 +0200
From: "Ahmed S. Darwish" <darwi@...utronix.de>
To: Borislav Petkov <bp@...en8.de>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	x86-cpuid@...ts.linux.dev
Cc: Thomas Gleixner <tglx@...utronix.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: [ANNOUNCE] x86-cpuid.org: A machine-readable CPUID repository

On x86 CPUs, the "CPUID" instruction is used for runtime identification
of CPU features.  It takes as input a leaf number in the EAX register
and an optional subleaf number in the ECX register.  According to the
leaf and subleaf, certain information regarding CPU identification and
supported features will be returned as output through the EAX, EBX, ECX,
and EDX registers.

Due to the extensiveness and long history of the x86 architecture, the
amount of information that can be queried through CPUID is huge: now up
to 800+ bitfields, scattered over 52 CPUID leaves.  The returned
bitfield descriptions can also differ according to the x86 CPU vendor.

We would like to announce the x86-cpuid.org project, which aims to:

  1. Standardize a machine-readable language/syntax for describing the
     CPUID instruction output.

  2. Build an extensive database, in that machine-readable syntax,
     describing all the publicly-known CPUID bitfields output.

     Such a database will be properly maintained and act as the standard
     information source for multiple open-source projects downstream.

  3. Augment the CPUID database with usage hints for significant open
     source projects like the Linux Kernel and the Xen hypervisor.
     Usage hints for other projects can be easily added later.

  4. Provide code and data generators utilizing that CPUID database.

In the project's machine-readable repository, we have covered:

   - 52  CPUID leaves (and all their known subleaves.)
   - 835 CPUID bitfields description, filtered by x86 CPU vendor.

Attached to the above CPUID bitfield descriptions are:

   - 274 Linux kernel x86 feature flags (X86_FEATURE_* definitions)
   - 230 Linux kernel /proc/cpuinfo flags
   - 198 Xen hypervisor feature and attribute flags

We have developed multiple "code/data generators" utilizing the above
information for downstream projects.

The first generator produces a complete CSV bitfield file for the Linux
kernel's kcpuid utility under tools/arch/x86/kcpuid.  This upgrades the
tool to complete CPUID coverage, and a kcpuid series will be sent as a
threaded reply to this announcement.

The second generator produces C data structures for all CPUID leaves,
with detailed C99 bitfield members included.  We expect to use it to
standardize the CPUID registers representation across the Linux kernel's
x86 subsystem among other goals that are to be outlined in future
series, such as a dependency data model for the kernel's X86_FEATURE
flags.

The project's documentation is extensive, and can be found at:

  - https://gitlab.com/x86-cpuid.org/x86-cpuid-db

At plumbers last year, I've discussed the origin story of this effort:

  - https://lpc.events/event/17/contributions/1511/

At the x86 microconference this year, I should also provide an update on
future steps:

  - https://lpc.events/event/18/contributions/1762/

Thanks a lot,
Ahmed

--
Linutronix GmbH

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ