* [PATCH] Print error code in page faults
@ 2007-02-24 5:31 Glauber de Oliveira Costa
2007-02-24 19:12 ` Chuck Ebbert
2007-02-25 21:34 ` Andi Kleen
0 siblings, 2 replies; 4+ messages in thread
From: Glauber de Oliveira Costa @ 2007-02-24 5:31 UTC (permalink / raw)
To: linux-kernel, akpm, ak
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
When a page faults comes from a kernel space, the printed summary
leaves us clueless about what kind of access was being tried (which
is encoded in the error_code variable).
Having it promply available may ease debugging in a bunch of
situations.
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
[-- Attachment #2: patch_err --]
[-- Type: text/plain, Size: 542 bytes --]
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index 6ada723..e65522e 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -539,7 +539,7 @@ no_context:
printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
else
printk(KERN_ALERT "Unable to handle kernel paging request");
- printk(" at %016lx RIP: \n" KERN_ALERT,address);
+ printk(" at %016lx (error=0x%02lx) RIP: \n" KERN_ALERT, error_code, address);
printk_address(regs->rip);
dump_pagetable(address);
tsk->thread.cr2 = address;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Print error code in page faults
2007-02-24 5:31 [PATCH] Print error code in page faults Glauber de Oliveira Costa
@ 2007-02-24 19:12 ` Chuck Ebbert
2007-02-25 2:44 ` Glauber de Oliveira Costa
2007-02-25 21:34 ` Andi Kleen
1 sibling, 1 reply; 4+ messages in thread
From: Chuck Ebbert @ 2007-02-24 19:12 UTC (permalink / raw)
To: Glauber de Oliveira Costa; +Cc: linux-kernel, akpm, ak
Glauber de Oliveira Costa wrote:
> When a page faults comes from a kernel space, the printed summary
> leaves us clueless about what kind of access was being tried (which
> is encoded in the error_code variable).
>
> Having it promply available may ease debugging in a bunch of
> situations.
>
> Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
>
>
>
> ------------------------------------------------------------------------
>
> diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
> index 6ada723..e65522e 100644
> --- a/arch/x86_64/mm/fault.c
> +++ b/arch/x86_64/mm/fault.c
> @@ -539,7 +539,7 @@ no_context:
> printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
> else
> printk(KERN_ALERT "Unable to handle kernel paging request");
> - printk(" at %016lx RIP: \n" KERN_ALERT,address);
> + printk(" at %016lx (error=0x%02lx) RIP: \n" KERN_ALERT, error_code, address);
> printk_address(regs->rip);
> dump_pagetable(address);
> tsk->thread.cr2 = address;
Umm, it's already there, right after the word "Oops".
Oops: 0002 [1] SMP
^^^^
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Print error code in page faults
2007-02-24 19:12 ` Chuck Ebbert
@ 2007-02-25 2:44 ` Glauber de Oliveira Costa
0 siblings, 0 replies; 4+ messages in thread
From: Glauber de Oliveira Costa @ 2007-02-25 2:44 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: linux-kernel, akpm, ak
On Sat, Feb 24, 2007 at 02:12:29PM -0500, Chuck Ebbert wrote:
>
> Umm, it's already there, right after the word "Oops".
>
>
> Oops: 0002 [1] SMP
> ^^^^
Oops! ;-)
--
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Print error code in page faults
2007-02-24 5:31 [PATCH] Print error code in page faults Glauber de Oliveira Costa
2007-02-24 19:12 ` Chuck Ebbert
@ 2007-02-25 21:34 ` Andi Kleen
1 sibling, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2007-02-25 21:34 UTC (permalink / raw)
To: Glauber de Oliveira Costa; +Cc: linux-kernel, akpm
On Saturday 24 February 2007 06:31, Glauber de Oliveira Costa wrote:
> When a page faults comes from a kernel space, the printed summary
> leaves us clueless about what kind of access was being tried (which
> is encoded in the error_code variable).
>
> Having it promply available may ease debugging in a bunch of
> situations.
It's in the __die output. I don't think outputting it twice is needed
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-02-25 21:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-24 5:31 [PATCH] Print error code in page faults Glauber de Oliveira Costa
2007-02-24 19:12 ` Chuck Ebbert
2007-02-25 2:44 ` Glauber de Oliveira Costa
2007-02-25 21:34 ` Andi Kleen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.