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: <20250704-taint_recovered-v1-2-7a817f2d228e@debian.org>
Date: Fri, 04 Jul 2025 03:55:20 -0700
From: Breno Leitao <leitao@...ian.org>
To: Len Brown <lenb@...nel.org>, James Morse <james.morse@....com>, 
 Jonathan Corbet <corbet@....net>, tony.luck@...el.com, rafael@...nel.org
Cc: Alexei Starovoitov <ast@...nel.org>, kbusch@...nel.org, rmikey@...a.com, 
 kuba@...nel.org, ast@...nel.org, linux-edac@...r.kernel.org, 
 mchehab@...nel.org, bp@...en8.de, linux-acpi@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org, 
 kernel-team@...a.com, Breno Leitao <leitao@...ian.org>
Subject: [PATCH 2/2] acpi/ghes: taint kernel on recovered hardware errors

Update the GHES error processing logic to taint the kernel when
a recoverable or corrected hardware error is detected.

If the error severity is GHES_SEV_RECOVERABLE or GHES_SEV_CORRECTED, the
TAINT_HW_ERROR_RECOVERED flag is set. This allows users and support
tools to identify systems that have experienced hardware issues that
were recovered at runtime, improving traceability and diagnostics.

Signed-off-by: Breno Leitao <leitao@...ian.org>
---
 drivers/acpi/apei/ghes.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 3d44f926afe8e..f323cefe234b9 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1102,13 +1102,16 @@ static int ghes_proc(struct ghes *ghes)
 {
 	struct acpi_hest_generic_status *estatus = ghes->estatus;
 	u64 buf_paddr;
-	int rc;
+	int rc, sev;
 
 	rc = ghes_read_estatus(ghes, estatus, &buf_paddr, FIX_APEI_GHES_IRQ);
 	if (rc)
 		goto out;
 
-	if (ghes_severity(estatus->error_severity) >= GHES_SEV_PANIC)
+	sev = ghes_severity(estatus->error_severity);
+	if (sev == GHES_SEV_RECOVERABLE || sev ==  GHES_SEV_CORRECTED)
+		add_taint(TAINT_HW_ERROR_RECOVERED, LOCKDEP_STILL_OK);
+	else if (sev >= GHES_SEV_PANIC)
 		__ghes_panic(ghes, estatus, buf_paddr, FIX_APEI_GHES_IRQ);
 
 	if (!ghes_estatus_cached(estatus)) {

-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ