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: <20150217105839.GB22233@redhat.com>
Date:	Tue, 17 Feb 2015 11:58:39 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Rik van Riel <riel@...hat.com>
Cc:	Borislav Petkov <bp@...en8.de>, dave.hansen@...ux.intel.com,
	sbsiddha@...il.com, luto@...capital.net, tglx@...utronix.de,
	mingo@...nel.org, hpa@...or.com, fenghua.yu@...el.com,
	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/8] x86, fpu: kill save_init_fpu(), change
	math_error() to use unlazy_fpu()

On 02/16, Rik van Riel wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 02/16/2015 04:09 PM, Borislav Petkov wrote:
> > On Fri, Feb 06, 2015 at 03:02:00PM -0500, riel@...hat.com wrote:
> >> From: Oleg Nesterov <oleg@...hat.com>
>
> >> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> >> index fb4cb6adf225..51c465846f06 100644 ---
> >> a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -663,7
> >> +663,7 @@ static void math_error(struct pt_regs *regs, int
> >> error_code, int trapnr) /* * Save the info for the exception
> >> handler and clear the error. */ -	save_init_fpu(task); +
> >> unlazy_fpu(task);
> >
> > Do I see it correctly that even with this there's a not-so-small
> > hole *after* conditional_sti() and *before* unlazy_fpu() where
> > caller can still get preempted?
>
> That's ok, the context switch will save the register contents
> to memory in that case.

Yes, thanks.

> At that point unlazy_fpu will potentially
> do nothing, and the task will process the FPU context that was
> saved to memory previously.

Or, if __thread_has_fpu() will be true again, it will save the registers
again.

And this equally applies to any other user of unlazy_fpu().

Oleg.

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