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: <20240321120548.22687-1-bp@alien8.de>
Date: Thu, 21 Mar 2024 13:05:47 +0100
From: Borislav Petkov <bp@...en8.de>
To: X86 ML <x86@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
	John Allen <john.allen@....com>
Subject: [PATCH 1/2] x86/microcode/AMD: Add a patch revision number union

From: "Borislav Petkov (AMD)" <bp@...en8.de>

Add a structure which will be used to split the Zen generation of
microcode revision numbers into its corresponding elements. This will be
used to match microcode patches a lot easier and obviate the need for
a equivalence table.

Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Cc: John Allen <john.allen@....com>
---
 arch/x86/include/asm/microcode.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/x86/include/asm/microcode.h b/arch/x86/include/asm/microcode.h
index 695e569159c1..c1de0a6aefbc 100644
--- a/arch/x86/include/asm/microcode.h
+++ b/arch/x86/include/asm/microcode.h
@@ -47,6 +47,18 @@ struct microcode_intel {
 	unsigned int			bits[];
 };
 
+union zen_patch_rev {
+	struct {
+		__u32 rev	: 8,
+		      stepping	: 4,
+		      model	: 4,
+		      __resv    : 4,
+		      ext_model	: 4,
+		      ext_fam	: 8;
+	};
+	__u32 ucode_rev;
+};
+
 #define DEFAULT_UCODE_DATASIZE		(2000)
 #define MC_HEADER_SIZE			(sizeof(struct microcode_header_intel))
 #define MC_HEADER_TYPE_MICROCODE	1
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ