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: <87ft0d7q2q.ffs@nanos.tec.linutronix.de>
Date:   Mon, 29 Mar 2021 20:49:33 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Len Brown <lenb@...nel.org>
Cc:     "Chang S. Bae" <chang.seok.bae@...el.com>,
        Borislav Petkov <bp@...e.de>,
        Andy Lutomirski <luto@...nel.org>,
        Ingo Molnar <mingo@...nel.org>, X86 ML <x86@...nel.org>,
        "Brown\, Len" <len.brown@...el.com>,
        Dave Hansen <dave.hansen@...el.com>,
        "Liu\, Jing2" <jing2.liu@...el.com>,
        "Ravi V. Shankar" <ravi.v.shankar@...el.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 14/22] x86/fpu/xstate: Expand the xstate buffer on the first use of dynamic user state

On Mon, Mar 29 2021 at 11:43, Len Brown wrote:
> On Mon, Mar 29, 2021 at 9:33 AM Thomas Gleixner <tglx@...utronix.de> wrote:
> But yes, if a bare metal OS doesn't support any threading libraries
> that query XCR0 with xgetbv, and they don't care about the performance
> impact of switching XCR0, they could choose to switch XCR0 and
> would want to TILERELEASE to assure C6 access, if it is enabled.

That's not the point. The C6 issue has nothing to do with the ABI
considerations vs. XCR0.

According to documentation it is irrelevant whether AMX usage is
disabled via XCR0, CR4.OSXSAVE or XFD[18]. In any case the effect of
AMX INIT=0 will prevent C6.

As I explained in great length there are enough ways to get into a
situation where this can happen and a CPU goes idle with AMX INIT=0.

So what are we supposed to do?

   - Use TILERELEASE on context switch after XSAVES?

   - Any other mechanism on context switch

   - Clear XFD[18] when going idle and issue TILERELEASE depending
     on the last state

   - Use any other means to set the thing back into INIT=1 state when
     going idle

There is no option 'shrug and ignore' unfortunately.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ