From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, ak@suse.de
Subject: [PATCH] Print error code in page faults
Date: Sat, 24 Feb 2007 02:31:25 -0300 [thread overview]
Message-ID: <20070224053125.GA20487@redhat.com> (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
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;
next 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 ` [PATCH] Print error code in page faults 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070224053125.GA20487@redhat.com \
--to=gcosta@redhat.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox