Skip to content

Commit

Permalink
powerpc/traps: add NOKPROBE_SYMBOL for sreset and mce
Browse files Browse the repository at this point in the history
These NMIs could fire any time including inside kprobe code, so
exclude them from kprobes.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-19-npiggin@gmail.com
  • Loading branch information
Nicholas Piggin authored and Michael Ellerman committed Feb 8, 2021
1 parent e44370a commit 3a31388
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ void system_reset_exception(struct pt_regs *regs)

/* What should we do here? We could issue a shutdown or hard reset. */
}
NOKPROBE_SYMBOL(system_reset_exception);

/*
* I/O accesses can cause machine checks on powermacs.
Expand Down Expand Up @@ -843,6 +844,7 @@ void machine_check_exception(struct pt_regs *regs)
bail:
if (nmi) nmi_exit();
}
NOKPROBE_SYMBOL(machine_check_exception);

void SMIException(struct pt_regs *regs)
{
Expand Down

0 comments on commit 3a31388

Please sign in to comment.