Re: [PATCH] pkeys: Make pkey unsigned in arch_set_user_pkey_access()

2022-03-07 Thread Ira Weiny
On Mon, Mar 07, 2022 at 12:30:03PM +0530, Aneesh Kumar K.V wrote: > ira.we...@intel.com writes: > > > From: Ira Weiny > > > > The WARN_ON check in arch_set_user_pkey_access() in the x86 architecture > > fails to check for an invalid negative value. > > > > A simple check for less than 0 would fix

Re: [PATCH] pkeys: Make pkey unsigned in arch_set_user_pkey_access()

2022-03-06 Thread Aneesh Kumar K.V
ira.we...@intel.com writes: > From: Ira Weiny > > The WARN_ON check in arch_set_user_pkey_access() in the x86 architecture > fails to check for an invalid negative value. > > A simple check for less than 0 would fix this issue however, in the call > stack below arch_set_user_pkey_access() the pke

[PATCH] pkeys: Make pkey unsigned in arch_set_user_pkey_access()

2022-03-04 Thread ira . weiny
From: Ira Weiny The WARN_ON check in arch_set_user_pkey_access() in the x86 architecture fails to check for an invalid negative value. A simple check for less than 0 would fix this issue however, in the call stack below arch_set_user_pkey_access() the pkey should never be negative on any archite