LKML Archive on
help / color / mirror / Atom feed
From: Glauber de Oliveira Costa <>
Subject: [PATCH] Print error code in page faults
Date: Sat, 24 Feb 2007 02:31:25 -0300	[thread overview]
Message-ID: <> (raw)

[-- 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

Signed-off-by: Glauber de Oliveira Costa <>

[-- 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");
 		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);
 	tsk->thread.cr2 = address;

             reply	other threads:[~2007-02-24  5:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-24  5:31 Glauber de Oliveira Costa [this message]
2007-02-24 19:12 ` Chuck Ebbert
2007-02-25  2:44   ` Glauber de Oliveira Costa
2007-02-25 21:34 ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: [PATCH] Print error code in page faults' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).