From: "Jan Beulich" <JBeulich@novell.com>
To: "Andreas Kleen" <ak@suse.de>
Cc: <linux-kernel@vger.kernel.org>, <discuss@x86-64.org>
Subject: [PATCH] x86-64: adjust page fault handling
Date: Tue, 08 Nov 2005 15:25:33 +0100 [thread overview]
Message-ID: <4370C36D.76F0.0078.0@novell.com> (raw)
In-Reply-To: 4370AFF0.76F0.0078.0@novell.com
[-- Attachment #1: Type: text/plain, Size: 173 bytes --]
Adjust page fault protection error check before considering it to be
a vmalloc synchronization candidate.
From: Jan Beulich <jbeulich@novell.com>
(actual patch attached)
[-- Attachment #2: linux-2.6.14-x86_64-pagefault.patch --]
[-- Type: application/octet-stream, Size: 1304 bytes --]
Adjust page fault protection error check before considering it to be
a vmalloc synchronization candidate.
From: Jan Beulich <jbeulich@novell.com>
--- 2.6.14/arch/x86_64/mm/fault.c 2005-10-28 02:02:08.000000000 +0200
+++ 2.6.14-x86_64-pagefault/arch/x86_64/mm/fault.c 2005-11-07 14:27:42.000000000 +0100
@@ -294,7 +294,8 @@ int exception_trace = 1;
* bit 0 == 0 means no page found, 1 means protection fault
* bit 1 == 0 means read, 1 means write
* bit 2 == 0 means kernel, 1 means user-mode
- * bit 3 == 1 means fault was an instruction fetch
+ * bit 3 == 1 means use of reserved bit detected
+ * bit 4 == 1 means fault was an instruction fetch
*/
asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
unsigned long error_code)
@@ -349,10 +350,10 @@ asmlinkage void __kprobes do_page_fault(
*
* This verifies that the fault happens in kernel space
* (error_code & 4) == 0, and that the fault was not a
- * protection error (error_code & 1) == 0.
+ * protection error (error_code & 9) == 0.
*/
if (unlikely(address >= TASK_SIZE64)) {
- if (!(error_code & 5) &&
+ if (!(error_code & 0xd) &&
((address >= VMALLOC_START && address < VMALLOC_END) ||
(address >= MODULES_VADDR && address < MODULES_END))) {
if (vmalloc_fault(address) < 0)
next prev parent reply other threads:[~2005-11-08 14:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 13:02 [PATCH] x86-64: separate unwind info generation from CONFIG_DEBUG_INFO Jan Beulich
2005-11-08 14:21 ` [PATCH] x86-64: fix bound check IDT gate Jan Beulich
2005-11-08 14:22 ` [PATCH] x86-64: remove dead die_if_kernel() Jan Beulich
2005-11-08 14:23 ` [PATCH] x86-64: make trap information available to die notification handlers Jan Beulich
2005-11-08 14:23 ` [PATCH] x86-64: adjust double fault handling Jan Beulich
2005-11-08 14:24 ` [PATCH] x86-64: remove unprotected iret Jan Beulich
2005-11-10 3:38 ` [discuss] " Andi Kleen
2005-11-08 14:25 ` Jan Beulich [this message]
2005-11-09 16:10 ` [PATCH] x86-64: adjust ia32entry.S Jan Beulich
2005-11-11 15:34 ` Andi Kleen
2005-11-11 15:50 ` Jan Beulich
2005-11-11 15:53 ` [discuss] " 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=4370C36D.76F0.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=ak@suse.de \
--cc=discuss@x86-64.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