[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210115125048.GB11337@zn.tnic>
Date: Fri, 15 Jan 2021 13:50:48 +0100
From: Borislav Petkov <bp@...e.de>
To: "Chang S. Bae" <chang.seok.bae@...el.com>
Cc: luto@...nel.org, tglx@...utronix.de, mingo@...nel.org,
x86@...nel.org, len.brown@...el.com, dave.hansen@...el.com,
jing2.liu@...el.com, ravi.v.shankar@...el.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 02/21] x86/fpu/xstate: Modify state copy helpers to
handle both static and dynamic buffers
On Wed, Dec 23, 2020 at 07:56:58AM -0800, Chang S. Bae wrote:
> In preparation for dynamic xstate buffer expansion, update the xstate
> copy function parameters to equally handle static in-line buffer, as well
> as dynamically allocated xstate buffer.
This is repeated from the previous patch. I'm sure you can think of text
which fits here.
>
> No functional change.
>
> Signed-off-by: Chang S. Bae <chang.seok.bae@...el.com>
> Reviewed-by: Len Brown <len.brown@...el.com>
> Cc: x86@...nel.org
> Cc: linux-kernel@...r.kernel.org
> ---
> Changes from v2:
> * Updated the changelog with task->fpu removed. (Boris Petkov)
> ---
> arch/x86/include/asm/fpu/xstate.h | 8 ++++----
> arch/x86/kernel/fpu/regset.c | 6 +++---
> arch/x86/kernel/fpu/signal.c | 16 +++++++---------
> arch/x86/kernel/fpu/xstate.c | 19 +++++++++++++++----
> 4 files changed, 29 insertions(+), 20 deletions(-)
>
> diff --git a/arch/x86/include/asm/fpu/xstate.h b/arch/x86/include/asm/fpu/xstate.h
> index 47a92232d595..e0f1b22f53ce 100644
> --- a/arch/x86/include/asm/fpu/xstate.h
> +++ b/arch/x86/include/asm/fpu/xstate.h
> @@ -105,10 +105,10 @@ const void *get_xsave_field_ptr(int xfeature_nr);
> int using_compacted_format(void);
> int xfeature_size(int xfeature_nr);
> struct membuf;
> -void copy_xstate_to_kernel(struct membuf to, struct xregs_state *xsave);
> -int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf);
> -int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf);
> -void copy_supervisor_to_kernel(struct xregs_state *xsave);
> +void copy_xstate_to_kernel(struct membuf to, struct fpu *fpu);
> +int copy_kernel_to_xstate(struct fpu *fpu, const void *kbuf);
> +int copy_user_to_xstate(struct fpu *fpu, const void __user *ubuf);
> +void copy_supervisor_to_kernel(struct fpu *fpu);
Hmm, so those functions have "xstate" in the name because they took and
@xstate parameter. I guess not such a big deal you changing them, just
pointing out what the naming logic was.
--
Regards/Gruss,
Boris.
SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
Powered by blists - more mailing lists