[PATCH 2/2] acpi/ghes: taint kernel on recovered hardware errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux