Commit c05a7ac4 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] ppc64: kprobes breaks BUG() handling

I was running some tests and noticed BUG() handling wasnt working as expected.
 The kprobes code has some code to check for breakpoint removal races and only
checks for one opcode.  It turns out there are many forms of the breakpoint
instruction, comparing against one is not good enough.

For the momemt remove the code in question so BUG()s work again and we can
discuss a better solution (I thought kprobes was emulating instructions or
running them out of line).
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a1996f88
......@@ -99,6 +99,7 @@ static inline int kprobe_handler(struct pt_regs *regs)
p = get_kprobe(addr);
if (!p) {
unlock_kprobes();
#if 0
if (*addr != BREAKPOINT_INSTRUCTION) {
/*
* The breakpoint instruction was removed right
......@@ -109,6 +110,7 @@ static inline int kprobe_handler(struct pt_regs *regs)
*/
ret = 1;
}
#endif
/* Not one of ours: let kernel handle it */
goto no_kprobe;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment