lkml.org 
[lkml]   [2010]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [tip:x86/mm] x86, mm: NX protection for kernel data


> At this point I need some help and guidance on how to track down what
> exactly happens there, as I am not very familiar with what goes into
> .data and why are we trying to execute it.
Can't you add debug printk in the fault handler before any exception processing

Something like that.

Matthieu

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index f627779..578ba52 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -629,6 +629,8 @@ no_context(struct pt_regs *regs, unsigned long error_code,
unsigned long flags;
int sig;

+ if (error_code & PF_INSTR)
+ printk("exec on NX\n");
/* Are we prepared to handle this kernel fault? */
if (fixup_exception(regs))
return;
\
 
 \ /
  Last update: 2010-03-02 17:25    [W:0.100 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site