public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [S390] Fix kprobes breakpoint handling.
@ 2007-01-26 16:53 Martin Schwidefsky
  0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2007-01-26 16:53 UTC (permalink / raw)
  To: linux-kernel, linux-s390; +Cc: heiko.carstens

From: Heiko Carstens <heiko.carstens@de.ibm.com>

[S390] Fix kprobes breakpoint handling.

In case of an illegal op the die notifier gets called with DIE_TRAP
instead of DIE_BPT first.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 arch/s390/kernel/traps.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff -urpN linux-2.6/arch/s390/kernel/traps.c linux-2.6-patched/arch/s390/kernel/traps.c
--- linux-2.6/arch/s390/kernel/traps.c	2007-01-26 17:27:47.000000000 +0100
+++ linux-2.6-patched/arch/s390/kernel/traps.c	2007-01-26 17:28:05.000000000 +0100
@@ -490,8 +490,15 @@ static void illegal_op(struct pt_regs * 
 #endif
 		} else
 			signal = SIGILL;
-	} else
-		signal = SIGILL;
+	} else {
+		/*
+		 * If we get an illegal op in kernel mode, send it through the
+		 * kprobes notifier. If kprobes doesn't pick it up, SIGILL
+		 */
+		if (notify_die(DIE_BPT, "bpt", regs, interruption_code,
+			       3, SIGTRAP) != NOTIFY_STOP)
+			signal = SIGILL;
+	}
 
 #ifdef CONFIG_MATHEMU
         if (signal == SIGFPE)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-26 16:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-26 16:53 [S390] Fix kprobes breakpoint handling Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox