[PATCH v12 20/22] selftests/vm: testcases must restore pkey-permissions

Dave Hansen dave.hansen at intel.com
Sat Mar 17 09:32:38 AEDT 2018


On 02/21/2018 05:55 PM, Ram Pai wrote:
> Generally the signal handler restores the state of the pkey register
> before returning. However there are times when the read/write operation
> can legitamely fail without invoking the signal handler.  Eg: A
> sys_read() operaton to a write-protected page should be disallowed.  In
> such a case the state of the pkey register is not restored to its
> original state.  The test case is responsible for restoring the key
> register state to its original value.

Oh, that's a good point.

Could we just do this in a common place, though?  Like reset the
register after each test?  Seems more foolproof.


More information about the Linuxppc-dev mailing list