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: <20240214182148.GFZc0EvDru3gmS2jFL@fat_crate.local>
Date: Wed, 14 Feb 2024 19:21:48 +0100
From: Borislav Petkov <bp@...en8.de>
To: Yazen Ghannam <yazen.ghannam@....com>
Cc: tony.luck@...el.com, linux-edac@...r.kernel.org,
	linux-kernel@...r.kernel.org, avadhut.naik@....com,
	john.allen@....com, muralidhara.mk@....com,
	naveenkrishna.chatradhi@....com, sathyapriya.k@....com
Subject: Re: [PATCH 2/2] RAS: Introduce the FRU Memory Poison Manager

On Wed, Feb 14, 2024 at 06:50:35PM +0100, Borislav Petkov wrote:
> On Wed, Feb 14, 2024 at 09:28:54AM -0500, Yazen Ghannam wrote:
> > > That's a good thing to have here.
> 
> Up to here. __packed still needs clarification.

Yap, that is plain old __packed, as we just established:

---

diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c
index 99499a37e9d5..a67a4b67cf9d 100644
--- a/drivers/ras/amd/fmpm.c
+++ b/drivers/ras/amd/fmpm.c
@@ -53,8 +53,6 @@
 #include <asm/cpu_device_id.h>
 #include <asm/mce.h>
 
-#pragma pack(1)
-
 /* Validation Bits */
 #define FMP_VALID_ARCH_TYPE		BIT_ULL(0)
 #define FMP_VALID_ARCH			BIT_ULL(1)
@@ -78,7 +76,7 @@ struct cper_sec_fru_mem_poison {
 	u32 fru_id_type;
 	u64 fru_id;
 	u32 nr_entries;
-};
+} __packed;
 
 /* FRU Descriptor ID Types */
 #define FPD_HW_ID_TYPE_MCA_IPID		0
@@ -93,7 +91,7 @@ struct cper_fru_poison_desc {
 	u64 hw_id;
 	u32 addr_type;
 	u64 addr;
-};
+} __packed;
 
 /* Collection of headers and sections for easy pointer use. */
 struct fru_rec {
@@ -101,10 +99,7 @@ struct fru_rec {
 	struct cper_section_descriptor	sec_desc;
 	struct cper_sec_fru_mem_poison	fmp;
 	struct cper_fru_poison_desc	entries[];
-};
-
-/* Reset to default packing */
-#pragma pack()
+} __packed;
 
 /*
  * Pointers to the complete CPER record of each FRU.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ