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: <20260206231442.89987471@davehans-spike.ostc.intel.com>
Date: Fri, 06 Feb 2026 15:14:42 -0800
From: Dave Hansen <dave.hansen@...ux.intel.com>
To: linux-kernel@...r.kernel.org
Cc: sohil.mehta@...el.com, zhao1.liu@...el.com, Dave Hansen <dave.hansen@...ux.intel.com>, Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>, Jon Kohler <jon@...anix.com>, Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>, "Peter Zijlstra (Intel)" <peterz@...radead.org>, Thomas Gleixner <tglx@...nel.org>, Tony Luck <tony.luck@...el.com>, x86@...nel.org
Subject: [PATCH 2/6] x86/cpu: Add missing #include


From: Dave Hansen <dave.hansen@...ux.intel.com>

The intel-family.h header uses Vendor/Family/Model macros but it does
not #include the header where they are defined. It must be depending
on implicit includes.

Include the required header explicitly.

Note that having this code in an explicitly #include'd header, non-x86
header means that the PECI code can zap its copy. Do that as well.

Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>
Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>
Cc: x86@...nel.org
Cc: Jon Kohler <jon@...anix.com>
---

 b/arch/x86/include/asm/intel-family.h |    7 +++++++
 b/include/linux/peci-cpu.h            |   20 --------------------
 2 files changed, 7 insertions(+), 20 deletions(-)

diff -puN arch/x86/include/asm/intel-family.h~fam-missing-include arch/x86/include/asm/intel-family.h
--- a/arch/x86/include/asm/intel-family.h~fam-missing-include	2026-02-06 15:14:22.380749864 -0800
+++ b/arch/x86/include/asm/intel-family.h	2026-02-06 15:14:22.387750111 -0800
@@ -3,6 +3,13 @@
 #define _ASM_X86_INTEL_FAMILY_H
 
 /*
+ * Note: despite being in arch/x86, the PECI driver(s) use
+ * this header in arch-independent drivers. Do not use
+ * any x86-specific headers here:
+ */
+#include <asm-generic/x86-vfm.h>
+
+/*
  * "Big Core" Processors (Branded as Core, Xeon, etc...)
  *
  * While adding a new CPUID for a new microarchitecture, add a new
diff -puN include/linux/peci-cpu.h~fam-missing-include include/linux/peci-cpu.h
--- a/include/linux/peci-cpu.h~fam-missing-include	2026-02-06 15:14:22.383749970 -0800
+++ b/include/linux/peci-cpu.h	2026-02-06 15:14:22.387750111 -0800
@@ -8,26 +8,6 @@
 
 /* Copied from x86 <asm/processor.h> */
 #define X86_VENDOR_INTEL       0
-
-/* Copied from x86 <asm/cpu_device_id.h> */
-#define VFM_MODEL_BIT	0
-#define VFM_FAMILY_BIT	8
-#define VFM_VENDOR_BIT	16
-#define VFM_RSVD_BIT	24
-
-#define	VFM_MODEL_MASK	GENMASK(VFM_FAMILY_BIT - 1, VFM_MODEL_BIT)
-#define	VFM_FAMILY_MASK	GENMASK(VFM_VENDOR_BIT - 1, VFM_FAMILY_BIT)
-#define	VFM_VENDOR_MASK	GENMASK(VFM_RSVD_BIT - 1, VFM_VENDOR_BIT)
-
-#define VFM_MODEL(vfm)	(((vfm) & VFM_MODEL_MASK) >> VFM_MODEL_BIT)
-#define VFM_FAMILY(vfm)	(((vfm) & VFM_FAMILY_MASK) >> VFM_FAMILY_BIT)
-#define VFM_VENDOR(vfm)	(((vfm) & VFM_VENDOR_MASK) >> VFM_VENDOR_BIT)
-
-#define	VFM_MAKE(_vendor, _family, _model) (	\
-	((_model) << VFM_MODEL_BIT) |		\
-	((_family) << VFM_FAMILY_BIT) |		\
-	((_vendor) << VFM_VENDOR_BIT)		\
-)
 /* End of copied code */
 
 #include "../../arch/x86/include/asm/intel-family.h"
_

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ