Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1675904
| From | "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC v4 09/17] powerpc: call the hash functions with the correct pkey value |
| Date | 2017-06-27 17:30 +0200 |
| Message-ID | <tX0Bd-2nz-41@gated-at.bofh.it> (permalink) |
| References | <tWVLc-7w2-3@gated-at.bofh.it> <tWVLe-7w2-75@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tuesday 27 June 2017 03:41 PM, Ram Pai wrote:
> Pass the correct protection key value to the hash functions on
> page fault.
>
> Signed-off-by: Ram Pai <linuxram@us.ibm.com>
> ---
> arch/powerpc/include/asm/pkeys.h | 11 +++++++++++
> arch/powerpc/mm/hash_utils_64.c | 4 ++++
> arch/powerpc/mm/mem.c | 6 ++++++
> 3 files changed, 21 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/pkeys.h b/arch/powerpc/include/asm/pkeys.h
> index ef1c601..1370b3f 100644
> --- a/arch/powerpc/include/asm/pkeys.h
> +++ b/arch/powerpc/include/asm/pkeys.h
> @@ -74,6 +74,17 @@ static inline bool mm_pkey_is_allocated(struct mm_struct *mm, int pkey)
> }
>
> /*
> + * return the protection key of the vma corresponding to the
> + * given effective address @ea.
> + */
> +static inline int mm_pkey(struct mm_struct *mm, unsigned long ea)
> +{
> + struct vm_area_struct *vma = find_vma(mm, ea);
> + int pkey = vma ? vma_pkey(vma) : 0;
> + return pkey;
> +}
> +
> +/*
>
That is not going to work in hash fault path right ? We can't do a
find_vma there without holding the mmap_sem
-aneesh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC v4 00/17] powerpc: Memory Protection Keys Ram Pai <linuxram@us.ibm.com> - 2017-06-27 12:20 +0200
[RFC v4 09/17] powerpc: call the hash functions with the correct pkey value Ram Pai <linuxram@us.ibm.com> - 2017-06-27 12:20 +0200
Re: [RFC v4 09/17] powerpc: call the hash functions with the correct pkey value "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2017-06-27 17:30 +0200
Re: [RFC v4 09/17] powerpc: call the hash functions with the correct pkey value Ram Pai <linuxram@us.ibm.com> - 2017-06-28 09:20 +0200
[RFC v4 02/17] mm: ability to disable execute permission on a key at creation Ram Pai <linuxram@us.ibm.com> - 2017-06-27 12:20 +0200
Re: [RFC v4 02/17] mm: ability to disable execute permission on a key at creation Balbir Singh <bsingharora@gmail.com> - 2017-06-27 13:40 +0200
[RFC v4 15/17] Documentation: Move protecton key documentation to arch neutral directory Ram Pai <linuxram@us.ibm.com> - 2017-06-27 12:20 +0200
[RFC v4 03/17] x86: key creation with PKEY_DISABLE_EXECUTE disallowed Ram Pai <linuxram@us.ibm.com> - 2017-06-27 12:20 +0200
Re: [RFC v4 03/17] x86: key creation with PKEY_DISABLE_EXECUTE disallowed Balbir Singh <bsingharora@gmail.com> - 2017-06-27 13:40 +0200
[RFC v4 04/17] powerpc: Implement sys_pkey_alloc and sys_pkey_free system call Ram Pai <linuxram@us.ibm.com> - 2017-06-27 12:20 +0200
Re: [RFC v4 00/17] powerpc: Memory Protection Keys Balbir Singh <bsingharora@gmail.com> - 2017-06-27 12:50 +0200
csiph-web