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: <YL/Nuuu8zvKvh3D0@zn.tnic>
Date:   Tue, 8 Jun 2021 22:06:18 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Yu-cheng Yu <yu-cheng.yu@...el.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Rik van Riel <riel@...riel.com>
Subject: Re: [patch V3 4/6] x86/pkru: Make PKRU=0 actually work

On Tue, Jun 08, 2021 at 09:15:42PM +0200, Thomas Gleixner wrote:
> But if nothing touched the FPU between T1 scheduling out and back in,
> then the fpregs_state is still valid which means switch_fpu_return()
> does nothing and just clears TIF_NEED_FPU_LOAD. Back to user space with
> DEFAULT_PKRU loaded. -> FAIL #2!

Ah ok.

> Why? It was clearly wrong and I can reproduce it with a hack which
> forces a schedule to a kernel thread and it fails all the way back to
> user space.

Oh, I was speculating about some weird luserspace's behavior of clearing
PKRU and then relying on the buggy behavior of getting PKRU restored to
DEFAULT_PKRU.

I know, it is nuts but it is user-visible change. And yeah, probably
nothing does that...

> I chased that because I observed sporadic failures when forcing PKRU to
> init state and then observed the default key being written. I had some
> extra trace_printks there to analyze something completely different :)

As you do. :-)

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ