lkml.org 
[lkml]   [2021]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 09/31] x86/fpu: Do not inherit FPU context for CLONE_THREAD
Date
On Tue, Oct 12 2021 at 20:52, Thomas Gleixner wrote:

> On Tue, Oct 12 2021 at 18:10, Borislav Petkov wrote:
>
>> On Tue, Oct 12, 2021 at 02:00:11AM +0200, Thomas Gleixner wrote:
>>> CLONE_THREAD does not have the guarantee of a true fork to inherit all
>>> state. Especially the FPU state is meaningless for CLONE_THREAD.
>>>
>>> Just wipe out the minimal required state so restore on return to user space
>>> let's the thread start with a clean FPU.
>>
>> This sentence reads weird, needs massaging.
>
> The patch is wrong and needs to be removed. I just double checked
> pthread_create() again and it says:
>
> The new thread inherits the calling thread's floating-point environment
> (fenv(3))
>
> No idea where I was looking at a few days ago. :(

But fenv(3) is not the FPU state. Duh!

Anyway. It's an optimization which we can do later still and not
required for the cleanups here.

Thanks,

tglx

\
 
 \ /
  Last update: 2021-10-12 21:02    [W:0.082 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site