Re: [PATCH v13 13/24] selftests/vm: pkey register should match shadow pkey

2018-07-17 Thread Ram Pai
On Wed, Jun 20, 2018 at 07:53:57AM -0700, Dave Hansen wrote: > On 06/13/2018 05:45 PM, Ram Pai wrote: > > +++ b/tools/testing/selftests/vm/protection_keys.c > > @@ -916,10 +916,10 @@ void expected_pkey_fault(int pkey) > > pkey_assert(last_si_pkey == pkey); > > > > /* > > -*

Re: [PATCH v13 13/24] selftests/vm: pkey register should match shadow pkey

2018-06-20 Thread Dave Hansen
On 06/13/2018 05:45 PM, Ram Pai wrote: > +++ b/tools/testing/selftests/vm/protection_keys.c > @@ -916,10 +916,10 @@ void expected_pkey_fault(int pkey) > pkey_assert(last_si_pkey == pkey); > > /* > - * The signal handler shold have cleared out PKEY register to let the > +

[PATCH v13 13/24] selftests/vm: pkey register should match shadow pkey

2018-06-13 Thread Ram Pai
expected_pkey_fault() is comparing the contents of pkey register with 0. This may not be true all the time. There could be bits set by default by the architecture which can never be changed. Hence compare the value against shadow pkey register, which is supposed to track the bits accurately all