]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/book3s64/pkeys: Mark all the pkeys above max pkey as reserved
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Thu, 9 Jul 2020 03:29:35 +0000 (08:59 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 20 Jul 2020 12:57:58 +0000 (22:57 +1000)
commit88ded22a87b62a9bdc60e696be2e2fb72eb352df
tree4082d39e1c1a7b709f32ee540b5142b384cac12a
parentecc62f028eca8db32c8403d5a2584a49fd4fd498
powerpc/book3s64/pkeys: Mark all the pkeys above max pkey as reserved

The hypervisor can return less than max allowed pkey (for ex: 31) instead
of 32. We should mark all the pkeys above max allowed as reserved so
that we avoid the allocation of the wrong pkey(for ex: key 31 in the above
case) by userspace.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200709032946.881753-13-aneesh.kumar@linux.ibm.com
arch/powerpc/mm/book3s64/pkeys.c