public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: "Huang, Ying" <ying.huang@intel.com>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>, Andi Kleen <ak@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/6] x86: fix NX bit handling in change_page_attr
Date: Fri, 25 Jan 2008 12:05:10 -0800	[thread overview]
Message-ID: <479A40F6.1050006@goop.org> (raw)
In-Reply-To: <20080125103256.GR23708@elte.hu>

Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
>
>   
>> ...
>> +       ref_prot = pte_pgprot(pte_mkexec(pte_clrhuge(*kpte)));
>>
>> i.e. it now goes through all the proper accessors.
>>     
>
> i guess it would be nicer to have the proper accessors to just clear the 
> NX bit from ref-prot - instead of re-constructing the *kpte from 
> scratch. But i see no other way to do it right now than to access 
> pgprot_val() as an lvalue. Jeremy, what would be the best approach here?

The pte_* accessors are really just helpers, so they're not mandatory.  
Something like this would be fine:

	refprot = __pgprot(pgprot_val(refprot) & ~_PAGE_NX);

This is identical to the lvalue form, but avoids using it as an lvalue.

    J

      reply	other threads:[~2008-01-25 20:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25  5:54 [PATCH 1/6] x86: fix NX bit handling in change_page_attr Huang, Ying
2008-01-25  7:32 ` Jeremy Fitzhardinge
2008-01-25  8:46   ` Ingo Molnar
2008-01-25 10:32     ` Ingo Molnar
2008-01-25 20:05       ` Jeremy Fitzhardinge [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=479A40F6.1050006@goop.org \
    --to=jeremy@goop.org \
    --cc=ak@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=ying.huang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox