Skip to content

Commit d7ce7e3

Browse files
leitaowilldeacon
authored andcommitted
arm64: Mark kernel as tainted on SAE and SError panic
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/[email protected]/ [1] Signed-off-by: Breno Leitao <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 75fdf82 commit d7ce7e3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

arch/arm64/kernel/traps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,7 @@ void __noreturn panic_bad_stack(struct pt_regs *regs, unsigned long esr, unsigne
931931

932932
void __noreturn arm64_serror_panic(struct pt_regs *regs, unsigned long esr)
933933
{
934+
add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
934935
console_verbose();
935936

936937
pr_crit("SError Interrupt on CPU%d, code 0x%016lx -- %s\n",

arch/arm64/mm/fault.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ static int do_sea(unsigned long far, unsigned long esr, struct pt_regs *regs)
826826
*/
827827
siaddr = untagged_addr(far);
828828
}
829+
add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
829830
arm64_notify_die(inf->name, regs, inf->sig, inf->code, siaddr, esr);
830831

831832
return 0;

0 commit comments

Comments
 (0)