[PATCH v5 11/13] EDAC/ghes: Increase memory error location and detail buffers
From: Pierre Gondois
Date: Mon Nov 30 2026 - 12:10:15 EST
Memory Error Section 2 can combine the roughly 263-character output of
cper_mem_err2_location() with a DIMM description from
cper_dimm_err2_location(). Increase LOCATION_SIZE to 512 to hold both.
print_mem_error2_other_detail() adds formatting text and a status
description to the location. Its output can include ~65 chars:
APEI location: <location> status(0xffffffffffff13ff): <status>
section_status:0xff
Allow about 65 chars plus the status description by sizing
OTHER_DETAIL_LEN relative to LOCATION_SIZE.
Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
---
drivers/edac/ghes_edac.c | 3 ++-
include/linux/edac.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index e940f56c9157..44111e40d9f5 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -17,7 +17,8 @@
#include <linux/notifier.h>
#include <linux/string.h>
-#define OTHER_DETAIL_LEN 400
+/* Allow 65 formatting characters plus the longest status description (63). */
+#define OTHER_DETAIL_LEN (LOCATION_SIZE + 128)
struct ghes_pvt {
struct mem_ctl_info *mci;
diff --git a/include/linux/edac.h b/include/linux/edac.h
index f7a8218f9cc0..ef0569aa97be 100644
--- a/include/linux/edac.h
+++ b/include/linux/edac.h
@@ -48,7 +48,7 @@ static inline void opstate_init(void)
#define EDAC_MC_LABEL_LEN 31
/* Maximum size of the location string */
-#define LOCATION_SIZE 256
+#define LOCATION_SIZE 512
/* Defines the maximum number of labels that can be reported */
#define EDAC_MAX_LABELS 8
--
2.43.0