From linuxram@us.ibm.com Tue Jan 23 06:37:28 2018 From: Ram Pai To: linux-kselftest-mirror@lists.linaro.org Subject: Re: [Linux-kselftest-mirror] [PATCH v10 01/27] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS is enabled Date: Mon, 22 Jan 2018 22:37:03 -0800 Message-ID: <20180123063703.GA5661@ram.oc3035372033.ibm.com> In-Reply-To: <1516326648-22775-2-git-send-email-linuxram@us.ibm.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3337746015578397591==" --===============3337746015578397591== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Andrew, Please apply the following two patches to your tree. [PATCH v10 01/27] mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_H= AS_PKEYS is enabled [PATCH v10 02/27] mm, powerpc, x86: introduce an additional vma bit for power= pc pkey I have not heard any complaints on these changes.=20 Dave Hansen had comments/suggestions in the initial revisions, which have be= en incorporated. Michael Ellermen has accepted the rest of the powerpc related patches in thi= s series. Thanks, RP On Thu, Jan 18, 2018 at 05:50:22PM -0800, Ram Pai wrote: > VM_PKEY_BITx are defined only if CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS > is enabled. Powerpc also needs these bits. Hence lets define the > VM_PKEY_BITx bits for any architecture that enables > CONFIG_ARCH_HAS_PKEYS. >=20 > Signed-off-by: Ram Pai > --- > fs/proc/task_mmu.c | 4 ++-- > include/linux/mm.h | 9 +++++---- > 2 files changed, 7 insertions(+), 6 deletions(-) >=20 > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 339e4c1..b139617 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -674,13 +674,13 @@ static void show_smap_vma_flags(struct seq_file *m, s= truct vm_area_struct *vma) > [ilog2(VM_MERGEABLE)] =3D "mg", > [ilog2(VM_UFFD_MISSING)]=3D "um", > [ilog2(VM_UFFD_WP)] =3D "uw", > -#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS > +#ifdef CONFIG_ARCH_HAS_PKEYS > /* These come out via ProtectionKey: */ > [ilog2(VM_PKEY_BIT0)] =3D "", > [ilog2(VM_PKEY_BIT1)] =3D "", > [ilog2(VM_PKEY_BIT2)] =3D "", > [ilog2(VM_PKEY_BIT3)] =3D "", > -#endif > +#endif /* CONFIG_ARCH_HAS_PKEYS */ > }; > size_t i; > =20 > diff --git a/include/linux/mm.h b/include/linux/mm.h > index ea818ff..01381d3 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -228,15 +228,16 @@ extern int overcommit_kbytes_handler(struct ctl_table= *, int, void __user *, > #define VM_HIGH_ARCH_4 BIT(VM_HIGH_ARCH_BIT_4) > #endif /* CONFIG_ARCH_USES_HIGH_VMA_FLAGS */ > =20 > -#if defined(CONFIG_X86) > -# define VM_PAT VM_ARCH_1 /* PAT reserves whole VMA at once (x86) */ > -#if defined (CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS) > +#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_BIT2 VM_HIGH_ARCH_2 > # define VM_PKEY_BIT3 VM_HIGH_ARCH_3 > -#endif > +#endif /* CONFIG_ARCH_HAS_PKEYS */ > + > +#if defined(CONFIG_X86) > +# define VM_PAT VM_ARCH_1 /* PAT reserves whole VMA at once (x86) */ > #elif defined(CONFIG_PPC) > # define VM_SAO VM_ARCH_1 /* Strong Access Ordering (powerpc) */ > #elif defined(CONFIG_PARISC) > --=20 > 1.7.1 >=20 > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo(a)kvack.org. For more info on Linux MM, > see: https://urldefense.proofpoint.com/v2/url?u=3Dhttp-3A__www.linux-2Dmm.o= rg_&d=3DDwIBAg&c=3Djf_iaSHvJObTbx-siA1ZOg&r=3Dm-UrKChQVkZtnPpjbF6YY99NbT8FBBy= Q-E-ygV8luxw&m=3DPsCrC-HVeq8M98fNireZs4GUBJvMwNZme7wZ1YdjMqs&s=3DV90akzFmL1g-= sNEcgmcUn_XJgJ8EaYmmsAS3AcVYScw&e=3D . > Don't email: email(a)kvack.org --=20 Ram Pai -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --===============3337746015578397591==--