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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jason Wessel <[email protected]>
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.

Signed-off-by: Tom Rini <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
---
 arch/x86/mm/fault_64.c      |    4 ++++
 include/asm-x86/kdebug_64.h |    1 +
 2 files changed, 5 insertions(+)

--- a/arch/x86/mm/fault_64.c
+++ b/arch/x86/mm/fault_64.c
@@ -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.
--- a/include/asm-x86/kdebug_64.h
+++ b/include/asm-x86/kdebug_64.h
@@ -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);

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux