lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 22 Jun 2021 12:48:33 +0200
From:   Borislav Petkov <bp@...e.de>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Yu-cheng Yu <yu-cheng.yu@...el.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Kan Liang <kan.liang@...ux.intel.com>
Subject: Re: [patch V3 36/66] x86/fpu: Rename initstate copy functions

On Fri, Jun 18, 2021 at 04:18:59PM +0200, Thomas Gleixner wrote:
> Again this not a copy. It's loading register state.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  arch/x86/kernel/fpu/core.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> --- a/arch/x86/kernel/fpu/core.c
> +++ b/arch/x86/kernel/fpu/core.c
> @@ -303,7 +303,7 @@ void fpu__drop(struct fpu *fpu)
>   * Clear FPU registers by setting them up from the init fpstate.
>   * Caller must do fpregs_[un]lock() around it.
>   */
> -static inline void copy_init_fpstate_to_fpregs(u64 features_mask)
> +static inline void load_fpregs_from_init_fpstate(u64 features_mask)
>  {
>  	if (use_xsave())
>  		os_xrstor(&init_fpstate.xsave, features_mask);
> @@ -338,9 +338,9 @@ static void fpu__clear(struct fpu *fpu,
>  		if (!fpregs_state_valid(fpu, smp_processor_id()) &&
>  		    xfeatures_mask_supervisor())
>  			os_xrstor(&fpu->state.xsave, xfeatures_mask_supervisor());
> -		copy_init_fpstate_to_fpregs(xfeatures_mask_user());
> +		load_fpregs_from_init_fpstate(xfeatures_mask_user());
>  	} else {
> -		copy_init_fpstate_to_fpregs(xfeatures_mask_all);
> +		load_fpregs_from_init_fpstate(xfeatures_mask_all);
>  	}

"load"?

I think you want "restore" here in accordance with the new convention,
like with the previous patch.

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ