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: <1690984066-31757-1-git-send-email-lixiaochun.2888@163.com>
Date:   Wed,  2 Aug 2023 21:47:46 +0800
From:   Xiaochun Lee <lixiaochun.2888@....com>
To:     lenb@...nel.org, rafael@...nel.org, tony.luck@...el.com
Cc:     rafael.j.wysocki@...el.com, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org, xiaocli@...hat.com,
        ahuang12@...ovo.com, Xiaochun Lee <lixc17@...ovo.com>
Subject: [PATCH v1] ACPI: extlog: Fix finding the generic error data for v3 structure

From: Xiaochun Lee <lixc17@...ovo.com>

Fix by using acpi_hest_get_payload( ) to find out the correct
generic error data for v3 structure. The revision v300 generic
error data is different from the old one, so for compatibility
with old and new version, change to a new interface to locate
the right memory error section that was defined in CPER.

Signed-off-by: Xiaochun Lee <lixc17@...ovo.com>
---
 drivers/acpi/acpi_extlog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index e648158368a7..e120a96e1eae 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -172,7 +172,7 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
 			fru_text = "";
 		sec_type = (guid_t *)gdata->section_type;
 		if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
-			struct cper_sec_mem_err *mem = (void *)(gdata + 1);
+			struct cper_sec_mem_err *mem = acpi_hest_get_payload(gdata);
 
 			if (gdata->error_data_length >= sizeof(*mem))
 				trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
-- 
2.37.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ