Re: [git pull] x86 fixes

Harvey Harrison
2008-03-27T21:09:35Z

> arch/x86/mm/fault.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> Index: linux-x86.q/arch/x86/mm/fault.c
> ===================================================================
> --- linux-x86.q.orig/arch/x86/mm/fault.c
> +++ linux-x86.q/arch/x86/mm/fault.c
> @@ -103,13 +103,10 @@ static int is_prefetch(struct pt_regs *r
> int prefetch = 0;
> unsigned char *max_instr;
>
> -#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 it was a exec (instruction fetch) fault on NX page, then
> + * do not ignore the fault:
> + */

How about:
If it was an exec (instruction fetch) fault, it cannot be a prefetch
fault.

> if (error_code & PF_INSTR)
> return 0;
>
>

Cheers,

Harvey