Skip to contentSkip to conversation

KGDB: This adds a call to notify_die()

PATCH In review Jason Wessel 1 participant 1 message Oct 15, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 11/21 KGDB: This adds a call to notify_die()

x86_64-no_context_hook.patch

From: Jason Wessel <[email protected]>
CC: [email protected]
Subject: [PATCH] This adds a call to notify_die()

A call to notify_die is added in the "no context" portion of do_page_fault() as someone on the chain might care and want to do a fixup.

---
 arch/x86/mm/fault_64.c      |    4 ++++
 include/asm-x86/kdebug_64.h |    1 +
 2 files changed, 5 insertions(+)
arch/x86/mm/fault_64.c +4 -0
@@ -531,6 +531,10 @@ no_context:
 	if (is_errata93(regs, address))
 		return; 
 
+	if (notify_die(DIE_PAGE_FAULT_NO_CONTEXT, "no context", regs,
+				error_code, 14, SIGSEGV) == NOTIFY_STOP)
+		return;
+
 /*
  * Oops. The kernel tried to access some bad page. We'll have to
  * terminate things with extreme prejudice.
include/asm-x86/kdebug_64.h +1 -0
@@ -23,6 +23,7 @@ enum die_val {
 	DIE_CALL,
 	DIE_NMI_IPI,
 	DIE_PAGE_FAULT,
+	DIE_PAGE_FAULT_NO_CONTEXT,
 };
 
 extern void printk_address(unsigned long address);