⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x86_64-no_context_hook.patch

📁 Linux-2.6.18内核调试工具补丁程序KGDB。
💻 PATCH
字号:
This adds a call to notify_die() in the "no context" portion ofdo_page_fault() as someone on the chain might care and want to do a fixup.Signed-off-by: Tom Rini <trini@kernel.crashing.org> arch/x86_64/mm/fault.c      |    4 ++++ include/asm-x86_64/kdebug.h |    1 + 2 files changed, 5 insertions(+)Index: linux-2.6.15-rc4/arch/x86_64/mm/fault.c===================================================================--- linux-2.6.15-rc4.orig/arch/x86_64/mm/fault.c+++ linux-2.6.15-rc4/arch/x86_64/mm/fault.c@@ -506,6 +506,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.Index: linux-2.6.15-rc4/include/asm-x86_64/kdebug.h===================================================================--- linux-2.6.15-rc4.orig/include/asm-x86_64/kdebug.h+++ linux-2.6.15-rc4/include/asm-x86_64/kdebug.h@@ -33,6 +33,7 @@ enum die_val {  	DIE_CALL, 	DIE_NMI_IPI, 	DIE_PAGE_FAULT,+	DIE_PAGE_FAULT_NO_CONTEXT, };  	 static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -