selftests/powerpc: Add pkey helpers for rights
authorSandipan Das <sandipan@linux.ibm.com>
Mon, 27 Jul 2020 04:00:36 +0000 (09:30 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 11:02:10 +0000 (21:02 +1000)
commit264d7fccc4711328a19f07e6bd57aee4c68803aa
tree073d8e445862db4d4e910151ee6d47af135d86e9
parent128d3d0210076232b7d54c361082c8ee17e4b669
selftests/powerpc: Add pkey helpers for rights

This adds some new pkey-related helper to print
access rights of a pkey in the "rwx" format and
to generate different valid combinations of pkey
rights starting from a given combination.

Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/6cc1c7d1f686618668a3e090f1d0c2a4cd9dea3f.1595821792.git.sandipan@linux.ibm.com
tools/testing/selftests/powerpc/include/pkeys.h
tools/testing/selftests/powerpc/mm/pkey_exec_prot.c