All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>, Andi Kleen <ak@suse.de>
Subject: Re: [PATCH] x86: Remove nx_enabled from fault.c
Date: Fri, 25 Jan 2008 11:14:19 +0100	[thread overview]
Message-ID: <20080125101418.GP23708@elte.hu> (raw)
In-Reply-To: <1201236068.12822.7.camel@brick>


* Harvey Harrison <harvey.harrison@gmail.com> wrote:

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

> @@ -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
> +

thanks, applied this portion of the patch.

> @@ -468,7 +463,7 @@ static int vmalloc_fault(unsigned long address)
>  	pmd_t *pmd, *pmd_ref;
>  	pte_t *pte, *pte_ref;
>  
> -	if (address >= VMALLOC_START && address < VMALLOC_END)
> +	if (!(address >= VMALLOC_START && address < VMALLOC_END))
>  		return -1;

hm, what's this?

	Ingo

      reply	other threads:[~2008-01-25 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25  4:41 [PATCH] x86: Remove nx_enabled from fault.c Harvey Harrison
2008-01-25 10:14 ` Ingo Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080125101418.GP23708@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@suse.de \
    --cc=harvey.harrison@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.