powerpc/kprobes: Invoke handlers directly
Invoke the kprobe handlers directly rather than through notify_die(), to
reduce path taken for handling kprobes. Similar to commit 6f6343f53d
("kprobes/x86: Call exception handlers directly from do_int3/do_debug").
While at it, rename post_kprobe_handler() to kprobe_post_handler() for
more uniform naming.
Reported-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
82de5797a2
commit
6cc89bad60
@@ -32,6 +32,7 @@
|
||||
#include <asm/probes.h>
|
||||
#include <asm/code-patching.h>
|
||||
|
||||
#ifdef CONFIG_KPROBES
|
||||
#define __ARCH_WANT_KPROBES_INSN_SLOT
|
||||
|
||||
struct pt_regs;
|
||||
@@ -127,5 +128,11 @@ struct kprobe_ctlblk {
|
||||
extern int kprobe_exceptions_notify(struct notifier_block *self,
|
||||
unsigned long val, void *data);
|
||||
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
||||
extern int kprobe_handler(struct pt_regs *regs);
|
||||
extern int kprobe_post_handler(struct pt_regs *regs);
|
||||
#else
|
||||
static inline int kprobe_handler(struct pt_regs *regs) { return 0; }
|
||||
static inline int kprobe_post_handler(struct pt_regs *regs) { return 0; }
|
||||
#endif /* CONFIG_KPROBES */
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _ASM_POWERPC_KPROBES_H */
|
||||
|
Reference in New Issue
Block a user