]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ACPI: APEI: GHES: add TAINT_MACHINE_CHECK on GHES panic path
authorBreno Leitao <leitao@debian.org>
Wed, 2 Jul 2025 15:39:51 +0000 (08:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:00 +0000 (18:41 +0200)
[ Upstream commit 4734c8b46b901cff2feda8b82abc710b65dc31c1 ]

When a GHES (Generic Hardware Error Source) triggers a panic, add the
TAINT_MACHINE_CHECK taint flag to the kernel. This explicitly marks the
kernel as tainted due to a machine check event, improving diagnostics
and post-mortem analysis. The taint is set with LOCKDEP_STILL_OK to
indicate lockdep remains valid.

At large scale deployment, this helps to quickly determine panics that
are coming due to hardware failures.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://patch.msgid.link/20250702-add_tain-v1-1-9187b10914b9@debian.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/apei/ghes.c

index 281a0a2f6730bafa853678a848537ca4b2222ebc..bda33a0f0a01316d639493ef08912ca41eb23b8e 100644 (file)
@@ -1099,6 +1099,8 @@ static void __ghes_panic(struct ghes *ghes,
 
        __ghes_print_estatus(KERN_EMERG, ghes->generic, estatus);
 
+       add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
+
        ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx);
 
        if (!panic_timeout)