selftests/powerpc: Fix pkey access right updates
authorSandipan Das <sandipan@linux.ibm.com>
Thu, 4 Jun 2020 12:56:08 +0000 (18:26 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 30 Jun 2020 04:37:47 +0000 (14:37 +1000)
commit828ca4320d130bbe1d12866152600c49ff6a9f79
tree19669711fd35c984590e4e6cb434cdbf11474ff8
parent105fb38124a490f38e9c1e23bb4c4a0b6ba12fdb
selftests/powerpc: Fix pkey access right updates

The Power ISA mandates that all writes to the Authority
Mask Register (AMR) must always be preceded as well as
succeeded by a context synchronizing instruction.

This makes sure that the tests follow this requirement
when attempting to update a pkey's access rights.

Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200604125610.649668-2-sandipan@linux.ibm.com
tools/testing/selftests/powerpc/include/reg.h
tools/testing/selftests/powerpc/ptrace/core-pkey.c
tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c