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: <20190814145537.fx73fwjvshpgdpue@linutronix.de>
Date:   Wed, 14 Aug 2019 16:55:37 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Mark Rutland <mark.rutland@....com>
Cc:     linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        akpm@...ux-foundation.org, bp@...e.de, catalin.marinas@....com,
        davem@...emloft.net, hch@....de, kan.liang@...el.com,
        mingo@...nel.org, peterz@...radead.org, riel@...riel.com,
        will@...nel.org
Subject: Re: [PATCH 8/9] x86/fpu: correctly check for kthreads

On 2019-08-14 14:39:10 [+0100], Mark Rutland wrote:
 > I think this was missed in commit.
> > 	8d3289f2fa1e0 ("x86/fpu: Don't use current->mm to check for a kthread")
> 
> Yup, though if it's a bug it's been a bug since commit:
> 
>   0cecca9d03c964ab ("x86/fpu: Eager switch PKRU state")
> 
> ... which I guess the fixes tag would have to mention.
> 
> > 
> > A kthread with use_mm() would load here non-existing FPU state.
> > 
> > Acked-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> 
> Given the above, should I add the fixes tag (for 0cecca9d03c964ab)?

Buh. Either that or hch's commit (8d3289f2fa1e0 ("x86/fpu: Don't use
current->mm to check for a kthread").
That will trigger a stable backport (for 5.2) asking what to do about
is_kthread() so please leave a hint to use the PF_ flag like hch did.

Now that I think about it, even if we end up in kthread with use_mm()
then its FPU state is non-existent which means get_xsave_addr() returns
NULL. This is okay / expected but it triggers the WARN_ONCE().

> Thanks,
> Mark.

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ