lkml.org 
[lkml]   [2015]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC 2/2] x86/fpu: change xsave_user() and xrestore_user() to use __user_insn()
On Mon, Mar 16, 2015 at 11:43:01PM +0100, Quentin Casasnovas wrote:
> So I'm really not sure about all the callers, but it seems that this
> instruction can be used to restore more than just the FPU state and I've no
> idea how much can change underneath gcc when we do so. It "feels" safe
> when saving the CPU state, not sure for the restoring case.

The clobber is to prevent gcc from optimizing accesses around the asm
volatile statement. And as Oleg said, this is user memory so if we want
to touch it, we will have a compiler barrier somewhere around that code.
I certainly hope we do...

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--


\
 
 \ /
  Last update: 2015-03-17 11:01    [W:0.082 / U:2.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site