lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7016a57-062a-a9f6-10dc-aafd9c8eb19f@intel.com>
Date:   Tue, 25 May 2021 15:28:56 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Dave Kleikamp <dave.kleikamp@...cle.com>,
        Babu Moger <babu.moger@....com>, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Cc:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, x86@...nel.org,
        hpa@...or.com, dave.hansen@...ux.intel.com, luto@...nel.org,
        peterz@...radead.org, shuah@...nel.org, jroedel@...e.de,
        ubizjak@...il.com, viro@...iv.linux.org.uk, jpa@....mail.kapsi.fi,
        fenghua.yu@...el.com, kan.liang@...ux.intel.com,
        akpm@...ux-foundation.org, rppt@...nel.org, Fan_Yang@...u.edu.cn,
        anshuman.khandual@....com, b.thiel@...teo.de, jgross@...e.com,
        keescook@...omium.org, seanjc@...gle.com, mh@...ndium.org,
        sashal@...nel.org, krisman@...labora.com, chang.seok.bae@...el.com,
        0x7f454c46@...il.com, jhubbard@...dia.com, sandipan@...ux.ibm.com,
        ziy@...dia.com, kirill.shutemov@...ux.intel.com,
        suxingxing@...ngson.cn, harish@...ux.ibm.com,
        rong.a.chen@...el.com, linuxram@...ibm.com, bauerman@...ux.ibm.com
Subject: Re: x86/fpu/xsave: protection key test failures

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ