lkml.org 
[lkml]   [2020]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] x86/fpu: Reset MXCSR to default in kernel_fpu_begin()
From
Date
On 6/22/20 11:33 AM, Andy Lutomirski wrote:
> Suppose you do:
>
> double x = 1.0;
>
> kernel_fpu_begin();
>
> x += 2.0;
>
> We want to make sure that GCC puts things in the right order. I
> suppose that even a memory clobber is insufficient here, though.

Even with CONFIG_PREEMPT disabled, we still have:

#define preempt_disable() barrier()

I don't see us supporting preemptible kernel_fpu regions any time soon,
so shouldn't this be sufficient now and for a long time?

\
 
 \ /
  Last update: 2020-06-22 20:38    [W:0.071 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site