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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YNIgh8TDBZRdiqbY@zn.tnic>
Date:   Tue, 22 Jun 2021 19:40:23 +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 60/66] x86/fpu/signal: Remove the legacy alignment
 check

On Fri, Jun 18, 2021 at 04:19:23PM +0200, Thomas Gleixner wrote:
> Checking for the XSTATE buffer being 64 byte aligned and if not deciding
> just to restore the FXSR state is daft.
> 
> If user space provides an unaligned math frame and has the extended state
> magic set in the FX software reserved bytes, then it really can keep the
> pieces.
> 
> If the frame is unaligned and the FX software magic is not set, then
> fx_only is already set and the restore will use fxrstor.
> 
> Remove it.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  arch/x86/kernel/fpu/signal.c |    3 ---
>  1 file changed, 3 deletions(-)
> 
> --- a/arch/x86/kernel/fpu/signal.c
> +++ b/arch/x86/kernel/fpu/signal.c
> @@ -306,9 +306,6 @@ static int __fpu_restore_sig(void __user
>  		}
>  	}
>  
> -	if ((unsigned long)buf_fx % 64)
> -		fx_only = 1;
> -
>  	if (!ia32_fxstate) {
>  		/*
>  		 * Attempt to restore the FPU registers directly from user

Nice, that was really daft.

Reviewed-by: Borislav Petkov <bp@...e.de>

-- 
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