]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64: Mark kernel as tainted on SAE and SError panic
authorBreno Leitao <leitao@debian.org>
Wed, 16 Jul 2025 09:42:01 +0000 (02:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:20 +0000 (16:28 +0200)
[ Upstream commit d7ce7e3a84642aadf7c4787f7ec4f58eb163d129 ]

Set TAINT_MACHINE_CHECK when SError or Synchronous External Abort (SEA)
interrupts trigger a panic to flag potential hardware faults. This
tainting mechanism aids in debugging and enables correlation of
hardware-related crashes in large-scale deployments.

This change aligns with similar patches[1] that mark machine check
events when the system crashes due to hardware errors.

Link: https://lore.kernel.org/all/20250702-add_tain-v1-1-9187b10914b9@debian.org/
Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20250716-vmcore_hw_error-v2-1-f187f7d62aba@debian.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/kernel/traps.c
arch/arm64/mm/fault.c

index 8b70759cdbb90c2d77192a32270e104fbba89ae5..610f8a1099f50bdcd4f79feb30fae7e96119671d 100644 (file)
@@ -953,6 +953,7 @@ void __noreturn panic_bad_stack(struct pt_regs *regs, unsigned long esr, unsigne
 
 void __noreturn arm64_serror_panic(struct pt_regs *regs, unsigned long esr)
 {
+       add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
        console_verbose();
 
        pr_crit("SError Interrupt on CPU%d, code 0x%016lx -- %s\n",
index 2e5d1e238af958e8dcdd07b498f990421b27cc02..893b9485b840a4e27f2f7bdd62089a93bcda6c56 100644 (file)
@@ -753,6 +753,7 @@ static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
                 */
                siaddr  = untagged_addr(far);
        }
+       add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
        arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
 
        return 0;