Re: [PATCH v12 15/22] selftests/vm: powerpc implementation to check support for pkey

2018-03-16 Thread Dave Hansen
On 02/21/2018 05:55 PM, Ram Pai wrote: > #define PAGE_SIZE (0x1UL << 16) > -static inline int cpu_has_pku(void) > +static inline bool is_pkey_supported(void) > { > - return 1; > + /* > + * No simple way to determine this. > + * lets try allocating a key and see if it succeeds. >

[PATCH v12 15/22] selftests/vm: powerpc implementation to check support for pkey

2018-02-21 Thread Ram Pai
pkey subsystem is supported if the hardware and kernel has support. We determine that by checking if allocation of a key succeeds or not. cc: Dave Hansen cc: Florian Weimer Signed-off-by: Ram Pai --- tools/testing/selftests/vm/pkey-helpers.h| 22 -- tools/testing/self