Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-31 Thread Thiago Jung Bauermann
Ram Pai writes: > static inline int mm_pkey_free(struct mm_struct *mm, int pkey) > { > - return -EINVAL; > + if (!pkey_inited) > + return -1; Sorry, I missed this earlier but the pkey_free syscall will pass this value to userspace so it needs to be an

Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-31 Thread Thiago Jung Bauermann
Ram Pai writes: > static inline int mm_pkey_free(struct mm_struct *mm, int pkey) > { > - return -EINVAL; > + if (!pkey_inited) > + return -1; Sorry, I missed this earlier but the pkey_free syscall will pass this value to userspace so it needs to be an errno as well

Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-29 Thread Ram Pai
On Thu, Jul 27, 2017 at 11:01:44AM -0300, Thiago Jung Bauermann wrote: > > Hello Ram, > > I'm still going through the patches and haven't formed a full picture of > the feature in my mind yet, so my comments today won't be particularly > insightful... > > But hopefully the comments that I

Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-29 Thread Ram Pai
On Thu, Jul 27, 2017 at 11:01:44AM -0300, Thiago Jung Bauermann wrote: > > Hello Ram, > > I'm still going through the patches and haven't formed a full picture of > the feature in my mind yet, so my comments today won't be particularly > insightful... > > But hopefully the comments that I

Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-27 Thread Thiago Jung Bauermann
Hello Ram, I'm still going through the patches and haven't formed a full picture of the feature in my mind yet, so my comments today won't be particularly insightful... But hopefully the comments that I currently have will be helpful anyway. Ram Pai writes: > diff --git

Re: [RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-27 Thread Thiago Jung Bauermann
Hello Ram, I'm still going through the patches and haven't formed a full picture of the feature in my mind yet, so my comments today won't be particularly insightful... But hopefully the comments that I currently have will be helpful anyway. Ram Pai writes: > diff --git

[RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-15 Thread Ram Pai
Total 32 keys are supported on powerpc. However pkey 0,1 and 31 are reserved. So effectively we have 29 pkeys. This patch keeps track of reserved keys, allocated keys and keys that are currently free. Also it adds skeletal functions and macros, that the architecture-independent code expects

[RFC v6 13/62] powerpc: track allocation status of all pkeys

2017-07-15 Thread Ram Pai
Total 32 keys are supported on powerpc. However pkey 0,1 and 31 are reserved. So effectively we have 29 pkeys. This patch keeps track of reserved keys, allocated keys and keys that are currently free. Also it adds skeletal functions and macros, that the architecture-independent code expects