diff options
author | Jan Beulich <jbeulich@novell.com> | 2006-01-11 22:42:23 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 19:01:11 -0800 |
commit | 8b1bde93175182d7c11d9a1230b2210a5815e747 (patch) | |
tree | 1394674c50a08138e8c47d943335124ae88d3397 /arch/x86_64/mm/fault.c | |
parent | 505cc4e1d6885acaee008950ac9c6e838f2209f8 (diff) |
[PATCH] x86_64: Adjust page fault handling
Adjust page fault protection error check before considering it to be
a vmalloc synchronization candidate.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/mm/fault.c')
-rw-r--r-- | arch/x86_64/mm/fault.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c index 21d1596946d..fd07b86c062 100644 --- a/arch/x86_64/mm/fault.c +++ b/arch/x86_64/mm/fault.c @@ -299,7 +299,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) @@ -342,10 +343,10 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, * * 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) |