Re: [git pull] x86 fixes

From: Harvey Harrison
Date: Thu Mar 27 2008 - 17:09:36 EST


> 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

--
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/