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: <20150313103406.GB31998@pd.tnic>
Date:	Fri, 13 Mar 2015 11:34:07 +0100
From:	Borislav Petkov <bp@...e.de>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Dave Hansen <dave.hansen@...el.com>,
	Ingo Molnar <mingo@...nel.org>,
	Andy Lutomirski <luto@...capital.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Pekka Riikonen <priikone@....fi>,
	Rik van Riel <riel@...hat.com>,
	Suresh Siddha <sbsiddha@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"Yu, Fenghua" <fenghua.yu@...el.com>,
	Quentin Casasnovas <quentin.casasnovas@...cle.com>
Subject: Re: [PATCH 2/4] x86/fpu: introduce restore_init_xstate()

On Wed, Mar 11, 2015 at 06:34:29PM +0100, Oleg Nesterov wrote:
> Extract the "use_eager_fpu()" code from drop_init_fpu() into the new
> simple helper, restore_init_xstate(). The next patch adds another user.
> 
> - It is not clear why we do not check use_fxsr() like fpu_restore_checking()
>   does.

Tell me about it.

> - It is not clear why we can't call setup_init_fpu_buf() unconditionally
>   to always create init_xstate_buf().

I also don't understand what the thought behind xstate_enable_boot_cpu()
and eager_fpu_init_bp() - we do call xstate_enable_boot_cpu() and alloc
init_xstate_buf and then when we come to

eager_fpu_init
|-> eager_fpu_init_bp

we get to init it if not initted yet.

When can that ever happen?

> Then do_device_not_available() path
>   (at least) could use restore_init_xstate() too. It doesn't need to init
>   fpu->state, its content doesn't matter until unlazy_fpu/__switch_to/etc
>   which overwrites this memory anyway.
> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
>  arch/x86/include/asm/fpu-internal.h |   16 ++++++++++------
>  1 files changed, 10 insertions(+), 6 deletions(-)

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ