Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b406ac61e94875723540bd56e26f634afdeef489 Commit: b406ac61e94875723540bd56e26f634afdeef489 Parent: c61e211d9989e4c112d3d58db12ad58f9016a3c8 Author: Harvey Harrison <[EMAIL PROTECTED]> AuthorDate: Wed Jan 30 13:34:11 2008 +0100 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Wed Jan 30 13:34:11 2008 +0100
x86: remove nx_enabled from fault.c On !PAE 32-bit, _PAGE_NX will be 0, making is_prefetch always return early. The test is sufficient on PAE as __supported_pte_mask is updated in the same places as nx_enabled in init_32.c which also takes disable_nx into account. 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.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 14a0c6e..99d273d 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -92,18 +92,13 @@ static int is_prefetch(struct pt_regs *regs, unsigned long addr, unsigned char *max_instr; #ifdef CONFIG_X86_32 -# ifdef CONFIG_X86_PAE - /* If it was a exec fault on NX page, ignore */ - if (nx_enabled && (error_code & PF_INSTR)) + if (!(__supported_pte_mask & _PAGE_NX)) return 0; -# else - return 0; -# endif -#else /* CONFIG_X86_64 */ +#endif + /* If it was a exec fault on NX page, ignore */ if (error_code & PF_INSTR) return 0; -#endif instr = (unsigned char *)convert_ip_to_linear(current, regs); max_instr = instr + 15; - 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