Re: [git pull] x86 fixes

From: Ingo Molnar
Date: Thu Mar 27 2008 - 16:55:52 EST



* Harvey Harrison <harvey.harrison@xxxxxxxxx> wrote:

> -#ifdef CONFIG_X86_32
> /* Catch an obscure case of prefetch inside an NX page: */
> - if ((__supported_pte_mask & _PAGE_NX) && (error_code & 16))
> - return 0;
> -#endif
> -
> - /* If it was a exec fault on NX page, ignore */
> - if (error_code & PF_INSTR)
> + if ((__supported_pte_mask & _PAGE_NX) && (error_code & PF_INSTR))
> return 0;

heh, did the exact same cleanup :)

i suspect we would be fine with a simple:

if (error_code & PF_INSTR)
return 0;

because if we get a fault on an instruction fetch then it clearly cannot
be a prefetch erratum ... The NX condition simply comes from a cautious
32-bit workaround. (on 64-bit we always have NX - at least on AMD which
has this erratum.)

and thus the currently pulled code is not incorrect, just ugly and
nonsensical.

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/