Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80231
b: refs/heads/master
c: 318aa29
h: refs/heads/master
i:
  80229: 282bb92
  80227: e979d35
  80223: 58fd5a0
v: v3
  • Loading branch information
Harvey Harrison authored and Ingo Molnar committed Jan 30, 2008
1 parent 8ab335e commit 7e02822
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a604b38036bee1483fb98a520c69895d5d6276a6
refs/heads/master: 318aa296c329625916c47703eab906d6ebf13930
7 changes: 4 additions & 3 deletions trunk/arch/x86/mm/fault_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -603,7 +604,7 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
__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))
Expand Down Expand Up @@ -674,7 +675,7 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
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;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/mm/fault_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
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;

Expand Down

0 comments on commit 7e02822

Please sign in to comment.