linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ppc64: kprobes breaks BUG() handling
@ 2005-01-10 11:19 Anton Blanchard
  2005-01-10 12:38 ` Ananth N Mavinakayanahalli
  2005-01-12 11:30 ` Ananth N Mavinakayanahalli
  0 siblings, 2 replies; 3+ messages in thread
From: Anton Blanchard @ 2005-01-10 11:19 UTC (permalink / raw)
  To: ananth, akpm; +Cc: paulus, linux-kernel


Hi,

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).

Anton

Signed-off-by: Anton Blanchard <anton@samba.org>

diff -puN arch/ppc64/kernel/kprobes.c~fix_breakage arch/ppc64/kernel/kprobes.c
--- foobar2/arch/ppc64/kernel/kprobes.c~fix_breakage	2005-01-10 21:41:43.157624895 +1100
+++ foobar2-anton/arch/ppc64/kernel/kprobes.c	2005-01-10 21:42:04.560169990 +1100
@@ -99,6 +99,7 @@ static inline int kprobe_handler(struct 
 	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 
 			 */
 			ret = 1;
 		}
+#endif
 		/* Not one of ours: let kernel handle it */
 		goto no_kprobe;
 	}
_

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-12 11:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-10 11:19 [PATCH] ppc64: kprobes breaks BUG() handling Anton Blanchard
2005-01-10 12:38 ` Ananth N Mavinakayanahalli
2005-01-12 11:30 ` Ananth N Mavinakayanahalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).