Re: Do x86 NX and AMD prefetch check cause page fault infinite loop?

From: Ingo Molnar
Date: Fri Jul 02 2004 - 07:19:00 EST



* Jamie Lokier <jamie@xxxxxxxxxxxxx> wrote:

> > - if (pmd_val(*pmd) & _PAGE_NX)
> > - printk(KERN_CRIT "kernel tried to access NX-protected page - exploit attempt? (uid: %d)\n", current->uid);
> > - }
> > - }
> > -#endif
> > + if (nx_enabled && (error_code & 16))
> > + printk(KERN_CRIT "kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n", current->uid);
>
> According to AMD's manual, bit 4 of error_code means the fault was due
> to an instruction fetch. It doesn't imply that it's an NX-protected
> page: it might be a page not present fault instead. (The manual
> doesn't spell that out, it just says the bit is set when it's an
> instruction fetch).

you are right, it doesnt say it's an NX related fault.

I'll test this out and send a delta patch.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/