Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136934
b: refs/heads/master
c: 8f76614
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Feb 20, 2009
1 parent 1fa4a2d commit 8648c6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: f2f13a8535174dbb813a0607a9d4737cfba98f6c
refs/heads/master: 8f7661496cece8320137d5e26808825498fd2b26
14 changes: 5 additions & 9 deletions trunk/arch/x86/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,28 +595,24 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address)
return 0;
}

static const char nx_warning[] = KERN_CRIT
"kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n";

static void
show_fault_oops(struct pt_regs *regs, unsigned long error_code,
unsigned long address)
{
#ifdef CONFIG_X86_32
if (!oops_may_print())
return;
#endif

#ifdef CONFIG_X86_PAE
if (error_code & PF_INSTR) {
unsigned int level;

pte_t *pte = lookup_address(address, &level);

if (pte && pte_present(*pte) && !pte_exec(*pte)) {
printk(KERN_CRIT "kernel tried to execute "
"NX-protected page - exploit attempt? "
"(uid: %d)\n", current_uid());
}
if (pte && pte_present(*pte) && !pte_exec(*pte))
printk(nx_warning, current_uid());
}
#endif

printk(KERN_ALERT "BUG: unable to handle kernel ");
if (address < PAGE_SIZE)
Expand Down

0 comments on commit 8648c6e

Please sign in to comment.