linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: benh@kernel.crashing.org, mpe@ellerman.id.au,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH 1/2] powerpc/mm: Update prot_none implementation using _PAGE_READ
Date: Wed, 2 Mar 2016 12:39:20 +1100	[thread overview]
Message-ID: <20160302013920.GC3160@oak.ozlabs.ibm.com> (raw)
In-Reply-To: <1456456850-2679-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

Another thing:

On Fri, Feb 26, 2016 at 08:50:49AM +0530, Aneesh Kumar K.V wrote:
> --- a/arch/powerpc/mm/hash_utils_64.c
> +++ b/arch/powerpc/mm/hash_utils_64.c
> @@ -173,9 +173,11 @@ unsigned long htab_convert_pte_flags(unsigned long pteflags)
>  	 * and there is no kernel RO (_PAGE_KERNEL_RO).
>  	 * User area is mapped with PP=0x2 for read/write
>  	 * or PP=0x3 for read-only (including writeable but clean pages).
> +	 * We also map user prot none as with PP=00.
>  	 */
>  	if (pteflags & _PAGE_USER) {
> -		rflags |= 0x2;
> +		if ((pteflags & _PAGE_READ) || (pteflags & _PAGE_RW))
> +			rflags |= 0x2;

You need to check _PAGE_EXEC too here.  I would do:

		if (pteflags & (_PAGE_READ | _PAGE_RW | _PAGE_EXEC))
			rflags |= 0x2;

Paul.

      parent reply	other threads:[~2016-03-02  1:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  3:20 [RFC PATCH 1/2] powerpc/mm: Update prot_none implementation using _PAGE_READ Aneesh Kumar K.V
2016-02-26  3:20 ` [RFC PATCH 2/2] powerpc/mm: Replace _PAGE_USER with _PAGE_PRIV Aneesh Kumar K.V
2016-02-29  2:36   ` Benjamin Herrenschmidt
2016-02-29  7:49     ` Aneesh Kumar K.V
2016-03-02  1:07   ` Paul Mackerras
2016-03-05  8:29     ` Aneesh Kumar K.V
2016-03-05 10:41       ` Paul Mackerras
2016-03-02  0:38 ` [RFC PATCH 1/2] powerpc/mm: Update prot_none implementation using _PAGE_READ Paul Mackerras
2016-03-02  1:39 ` Paul Mackerras [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=20160302013920.GC3160@oak.ozlabs.ibm.com \
    --to=paulus@ozlabs.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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;
as well as URLs for NNTP newsgroup(s).