Re: [PATCH 2/5] x86, fpu: don't drop_fpu() in __restore_xstate_sig() if use_eager_fpu()

From: Linus Torvalds
Date: Mon Aug 25 2014 - 12:27:55 EST


On Mon, Aug 25, 2014 at 7:41 AM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> I think this should be safe, because this thread and/or swapper/0 can
> do nothing with with fpu->state, and they should not use fpu.

.. but if that's the case, then what was wrong with the old code that
just copied the state over the unused space from the user space
buffer?

You can't have it both ways. Either the old code was fine (because it
doesn't use the buffer while it is in flux), or the new code is broken
(because it uses the shared buffer). Your choice.No?

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/