Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-29 Thread Ram Pai
On Fri, Jul 28, 2017 at 06:00:02PM -0300, Thiago Jung Bauermann wrote: > > Ram Pai writes: > > --- a/arch/powerpc/mm/pkeys.c > > +++ b/arch/powerpc/mm/pkeys.c > > @@ -201,3 +201,36 @@ int __arch_override_mprotect_pkey(struct > > vm_area_struct *vma, int prot, > > */ >

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-28 Thread Thiago Jung Bauermann
Ram Pai writes: > --- a/arch/powerpc/mm/pkeys.c > +++ b/arch/powerpc/mm/pkeys.c > @@ -201,3 +201,36 @@ int __arch_override_mprotect_pkey(struct vm_area_struct > *vma, int prot, >*/ > return vma_pkey(vma); > } > + > +static bool pkey_access_permitted(int pkey,

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-21 Thread Ram Pai
On Fri, Jul 21, 2017 at 12:21:50PM +0530, Aneesh Kumar K.V wrote: > Ram Pai writes: > > > On Thu, Jul 20, 2017 at 12:12:47PM +0530, Aneesh Kumar K.V wrote: > >> Ram Pai writes: > >> > >> > helper function that checks if the read/write/execute is

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-21 Thread Aneesh Kumar K.V
Ram Pai writes: > On Thu, Jul 20, 2017 at 12:12:47PM +0530, Aneesh Kumar K.V wrote: >> Ram Pai writes: >> >> > helper function that checks if the read/write/execute is allowed >> > on the pte. >> > >> > Signed-off-by: Ram Pai >> >

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-20 Thread Ram Pai
On Thu, Jul 20, 2017 at 12:12:47PM +0530, Aneesh Kumar K.V wrote: > Ram Pai writes: > > > helper function that checks if the read/write/execute is allowed > > on the pte. > > > > Signed-off-by: Ram Pai > > --- > >

Re: [RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-20 Thread Aneesh Kumar K.V
Ram Pai writes: > helper function that checks if the read/write/execute is allowed > on the pte. > > Signed-off-by: Ram Pai > --- > arch/powerpc/include/asm/book3s/64/pgtable.h |4 +++ > arch/powerpc/include/asm/pkeys.h | 12 +

[RFC v6 27/62] powerpc: helper to validate key-access permissions of a pte

2017-07-15 Thread Ram Pai
helper function that checks if the read/write/execute is allowed on the pte. Signed-off-by: Ram Pai --- arch/powerpc/include/asm/book3s/64/pgtable.h |4 +++ arch/powerpc/include/asm/pkeys.h | 12 + arch/powerpc/mm/pkeys.c |