Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=318aa296c329625916c47703eab906d6ebf13930
Commit: 318aa296c329625916c47703eab906d6ebf13930
Parent: a604b38036bee1483fb98a520c69895d5d6276a6
Author: Harvey Harrison <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:32:59 2008 +0100
Committer: Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:32:59 2008 +0100
x86: more users of PF_ constants in fault_32|64.c
Should be the last of the error_code tests that could use
the PF_ defines. Makes X86_32|64 a little closer.
Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]>
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
arch/x86/mm/fault_32.c | 7 ++++---
arch/x86/mm/fault_64.c | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c
index b1893eb..421e276 100644
--- a/arch/x86/mm/fault_32.c
+++ b/arch/x86/mm/fault_32.c
@@ -404,7 +404,8 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned
long error_code)
* protection error (error_code & 9) == 0.
*/
if (unlikely(address >= TASK_SIZE)) {
- if (!(error_code & 0x0000000d) && vmalloc_fault(address) >= 0)
+ if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) &&
+ vmalloc_fault(address) >= 0)
return;
if (notify_page_fault(regs))
return;
@@ -603,7 +604,7 @@ no_context:
__typeof__(pte_val(__pte(0))) page;
#ifdef CONFIG_X86_PAE
- if (error_code & 16) {
+ if (error_code & PF_INSTR) {
pte_t *pte = lookup_address(address);
if (pte && pte_present(*pte) && !pte_exec_kernel(*pte))
@@ -674,7 +675,7 @@ out_of_memory:
goto survive;
}
printk("VM: killing process %s\n", tsk->comm);
- if (error_code & 4)
+ if (error_code & PF_USER)
do_group_exit(SIGKILL);
goto no_context;
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c
index 058b04c..95f142f 100644
--- a/arch/x86/mm/fault_64.c
+++ b/arch/x86/mm/fault_64.c
@@ -677,7 +677,7 @@ out_of_memory:
goto again;
}
printk("VM: killing process %s\n", tsk->comm);
- if (error_code & 4)
+ if (error_code & PF_USER)
do_group_exit(SIGKILL);
goto no_context;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html