[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181210144158.46sbqy5b3lkhcra5@linutronix.de>
Date: Mon, 10 Dec 2018 15:41:58 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: linux-kernel@...r.kernel.org
Cc: x86@...nel.org, Andy Lutomirski <luto@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
kvm@...r.kernel.org, "Jason A. Donenfeld" <Jason@...c4.com>,
Rik van Riel <riel@...riel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH 29/29] x86/fpu: Defer FPU state load until return to
userspace
On 2018-11-28 23:20:35 [+0100], To linux-kernel@...r.kernel.org wrote:
> --- a/arch/x86/kernel/fpu/signal.c
> +++ b/arch/x86/kernel/fpu/signal.c
> @@ -228,13 +228,12 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
> struct task_struct *tsk = current;
> struct fpu *fpu = &tsk->thread.fpu;
> int state_size = fpu_kernel_xstate_size;
> - union fpregs_state *state;
> - void *tmp;
> struct user_i387_ia32_struct env;
> struct user_i387_ia32_struct *envp = NULL;
> int ret = 0;
> u64 xfeatures = 0;
> int fx_only = 0;
> + int err;
>
…
> } else if (use_fxsr()) {
> - ret = __copy_from_user(&state->fxsave, buf_fx, state_size);
> - if (ret)
> + ret = __copy_from_user(&fpu->state.fxsave, buf_fx, state_size);
> + if (ret) {
> + err = -EFAULT;
> goto err_out;
> + }
After reworking the series after addressing the comments for 08/29 I
noticed that `err' should have been `ret'.
Sebastian
Powered by blists - more mailing lists