Re: x86/fpu/xsave: protection key test failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/25/21 3:22 PM, Dave Kleikamp wrote:
> On 5/25/21 5:18 PM, Dave Hansen wrote:
>> What values do PKRU and the shadow have when the test fails?  Is PKRU 0?
>>   Any idea how xfeatures&0x200 got clear?
> 
> I did observe that PKRU is 0 right before the failure.
> 
> Shouldn't this still be a valid value?

It's architecturall *valid* in the hardware for sure, but nothing in the
tests or the kernel should ever set PKRU=0.  The selftest is noticing
that it ends up at a value that's entirely unexpected and properly
bugging out.

The reason I'm suspecting an XRSTOR is that the kernel always calls

	XRSTOR(RFBM=-1)

setting all of the bits in the Requested Feature BitMap (RFBM).  If
RFBM[X]=1 and XSTATE_BV[i]=0 (XSTATE_BV is 'xfeatures' in the traces),
then the state component is set to its initial configuration, which for
PKRU is 0.

That's why I'm asking how xfeatures&0x200 got clear.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux