All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Ram Pai <linuxram@us.ibm.com>,
	mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org,
	x86@kernel.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org, benh@kernel.crashing.org,
	paulus@samba.org, khandual@linux.vnet.ibm.com,
	aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com,
	hbabu@us.ibm.com, mhocko@kernel.org, bauerman@linux.vnet.ibm.com,
	ebiederm@xmission.com, corbet@lwn.net, arnd@arndb.de,
	fweimer@redhat.com, msuchanek@suse.com
Subject: Re: [PATCH v12 2/3] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey
Date: Mon, 26 Feb 2018 13:14:34 -0800	[thread overview]
Message-ID: <d3f6b6a1-8319-449a-804e-bf9d1dedbb5f@intel.com> (raw)
In-Reply-To: <1519257138-23797-3-git-send-email-linuxram@us.ibm.com>

On 02/21/2018 03:52 PM, Ram Pai wrote:
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index ad207ad..d534f46 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -231,9 +231,10 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,
>  #ifdef CONFIG_ARCH_HAS_PKEYS
>  # define VM_PKEY_SHIFT	VM_HIGH_ARCH_BIT_0
>  # define VM_PKEY_BIT0	VM_HIGH_ARCH_0	/* A protection key is a 4-bit value */
> -# define VM_PKEY_BIT1	VM_HIGH_ARCH_1
> +# define VM_PKEY_BIT1	VM_HIGH_ARCH_1	/* on x86 and 5-bit value on ppc64   */
>  # define VM_PKEY_BIT2	VM_HIGH_ARCH_2
>  # define VM_PKEY_BIT3	VM_HIGH_ARCH_3
> +# define VM_PKEY_BIT4	VM_HIGH_ARCH_4
>  #endif /* CONFIG_ARCH_HAS_PKEYS */

I think I would prefer if VM_PKEY_BIT4 was unusable on x86, or #defined
to 0.  We don't want folks using a bit that can not be programmed into
the hardware.

WARNING: multiple messages have this Message-ID (diff)
From: Dave Hansen <dave.hansen@intel.com>
To: Ram Pai <linuxram@us.ibm.com>,
	mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org,
	x86@kernel.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org, benh@kernel.crashing.org,
	paulus@samba.org, khandual@linux.vnet.ibm.com,
	aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com,
	hbabu@us.ibm.com, mhocko@kernel.org, bauerman@linux.vnet.ibm.com,
	ebiederm@xmission.com, corbet@lwn.net, arnd@arndb.de,
	fweimer@redhat.com, msuchanek@suse.com
Subject: Re: [PATCH v12 2/3] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey
Date: Mon, 26 Feb 2018 13:14:34 -0800	[thread overview]
Message-ID: <d3f6b6a1-8319-449a-804e-bf9d1dedbb5f@intel.com> (raw)
In-Reply-To: <1519257138-23797-3-git-send-email-linuxram@us.ibm.com>

On 02/21/2018 03:52 PM, Ram Pai wrote:
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index ad207ad..d534f46 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -231,9 +231,10 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,
>  #ifdef CONFIG_ARCH_HAS_PKEYS
>  # define VM_PKEY_SHIFT	VM_HIGH_ARCH_BIT_0
>  # define VM_PKEY_BIT0	VM_HIGH_ARCH_0	/* A protection key is a 4-bit value */
> -# define VM_PKEY_BIT1	VM_HIGH_ARCH_1
> +# define VM_PKEY_BIT1	VM_HIGH_ARCH_1	/* on x86 and 5-bit value on ppc64   */
>  # define VM_PKEY_BIT2	VM_HIGH_ARCH_2
>  # define VM_PKEY_BIT3	VM_HIGH_ARCH_3
> +# define VM_PKEY_BIT4	VM_HIGH_ARCH_4
>  #endif /* CONFIG_ARCH_HAS_PKEYS */

I think I would prefer if VM_PKEY_BIT4 was unusable on x86, or #defined
to 0.  We don't want folks using a bit that can not be programmed into
the hardware.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2018-02-26 21:14 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21 23:52 [PATCH v12 0/3] mm, x86, powerpc: Enhancements to Memory Protection Keys Ram Pai
2018-02-21 23:52 ` Ram Pai
2018-02-21 23:52 ` Ram Pai
2018-02-21 23:52 ` [PATCH v12 1/3] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled Ram Pai
2018-02-21 23:52   ` Ram Pai
2018-02-21 23:52   ` Ram Pai
2018-02-23  7:11   ` kbuild test robot
2018-02-23  7:11     ` kbuild test robot
2018-02-23  7:11     ` kbuild test robot
2018-02-24  1:05     ` Ram Pai
2018-02-24  1:05       ` Ram Pai
2018-02-24  1:05       ` Ram Pai
2018-02-25 11:57       ` Aneesh Kumar K.V
2018-02-25 11:57         ` Aneesh Kumar K.V
2018-02-25 11:57         ` Aneesh Kumar K.V
2018-02-26  7:26         ` Ram Pai
2018-02-26  7:26           ` Ram Pai
2018-02-23  8:06   ` kbuild test robot
2018-02-23  8:06     ` kbuild test robot
2018-02-23  8:06     ` kbuild test robot
2018-02-26 21:12   ` Dave Hansen
2018-02-26 21:12     ` Dave Hansen
2018-02-21 23:52 ` [PATCH v12 2/3] mm, powerpc, x86: introduce an additional vma bit for powerpc pkey Ram Pai
2018-02-21 23:52   ` Ram Pai
2018-02-21 23:52   ` Ram Pai
2018-02-26 21:14   ` Dave Hansen [this message]
2018-02-26 21:14     ` Dave Hansen
2018-02-21 23:52 ` [PATCH v12 3/3] mm, x86, powerpc: display pkey in smaps only if arch supports pkeys Ram Pai
2018-02-21 23:52   ` Ram Pai
2018-02-21 23:52   ` Ram Pai
2018-02-26 21:16   ` Dave Hansen
2018-02-26 21:16     ` Dave Hansen
2018-03-08 18:25     ` mm, x86, powerpc: pkey semantics for key-0 ? Ram Pai
2018-03-08 19:30       ` Dave Hansen

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=d3f6b6a1-8319-449a-804e-bf9d1dedbb5f@intel.com \
    --to=dave.hansen@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=bauerman@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=bsingharora@gmail.com \
    --cc=corbet@lwn.net \
    --cc=ebiederm@xmission.com \
    --cc=fweimer@redhat.com \
    --cc=hbabu@us.ibm.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=linuxram@us.ibm.com \
    --cc=mhocko@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=msuchanek@suse.com \
    --cc=paulus@samba.org \
    --cc=x86@kernel.org \
    /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.