From: Rik van Riel <riel@redhat.com>
To: Borislav Petkov <bp@alien8.de>, oleg@redhat.com
Cc: dave.hansen@linux.intel.com, sbsiddha@gmail.com,
luto@amacapital.net, tglx@linutronix.de, mingo@kernel.org,
hpa@zytor.com, fenghua.yu@intel.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu()
Date: Mon, 16 Feb 2015 16:30:50 -0500 [thread overview]
Message-ID: <54E2618A.9090203@redhat.com> (raw)
In-Reply-To: <20150216210938.GN4458@pd.tnic>
-----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@redhat.com wrote:
>> From: Oleg Nesterov <oleg@redhat.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. At that point unlazy_fpu will potentially
do nothing, and the task will process the FPU context that was
saved to memory previously.
- --
All rights reversed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJU4mGKAAoJEM553pKExN6DHoAH/1R3Pak5bZrvnCEBd3lp9/uD
bqtms5VjiWNNhlG0Hpob0eS71p8fO9La8+hPwFQJdK9yZ2lwvrDEXMCMGOG1P8by
HHbtxS74tUIm49qlIIUNxoiI+HMDnOQNhYv9dA4VdTMcY//2Asr6g4LM3wFH+f1q
tZJ5CU5/f0g2SCtTEzXxZDQdlqgpGXpvcGVymENe45uzn5ZYgcbCAiix+Dy5SiCw
+GjURoRW07iRSvK48w8vTVstTwl2WKgHpWEGVGhL1RyJY6aMIft3b4FH1jUrhVVJ
w3ncQAptA2ry/anU/6A2aTrZ646ebJuYejhF99gwTucolJ3netdX7xohOaFEpSc=
=/rU9
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2015-02-16 21:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 20:01 [PATCH 0/8] x86,fpu: various small FPU cleanups and optimizations riel
2015-02-06 20:01 ` [PATCH 1/8] x86, fpu: unlazy_fpu: don't reset thread.fpu_counter riel
2015-02-16 17:04 ` Borislav Petkov
2015-02-16 17:58 ` Rik van Riel
2015-02-16 18:14 ` Oleg Nesterov
2015-02-16 18:16 ` Borislav Petkov
2015-02-19 11:32 ` [tip:x86/fpu] x86/fpu: Don't " tip-bot for Oleg Nesterov
2015-02-06 20:01 ` [PATCH 2/8] x86, fpu: unlazy_fpu: don't do __thread_fpu_end() if use_eager_fpu() riel
2015-02-16 20:25 ` Borislav Petkov
2015-02-17 10:47 ` Oleg Nesterov
2015-02-17 12:09 ` Borislav Petkov
2015-02-19 11:32 ` [tip:x86/fpu] x86/fpu: Don't " tip-bot for Oleg Nesterov
2015-02-06 20:02 ` [PATCH 3/8] x86, fpu: kill save_init_fpu(), change math_error() to use unlazy_fpu() riel
2015-02-16 21:09 ` Borislav Petkov
2015-02-16 21:30 ` Rik van Riel [this message]
2015-02-17 10:58 ` Oleg Nesterov
2015-02-19 11:32 ` [tip:x86/fpu] x86/fpu: Change math_error() to use unlazy_fpu(), kill (now) unused save_init_fpu() tip-bot for Oleg Nesterov
2015-02-06 20:02 ` [PATCH 4/8] x86,fpu: move lazy restore functions up a few lines riel
2015-02-19 11:33 ` [tip:x86/fpu] x86/fpu: Move " tip-bot for Rik van Riel
2015-02-06 20:02 ` [PATCH 5/8] x86,fpu: introduce task_disable_lazy_fpu_restore helper riel
2015-02-19 11:33 ` [tip:x86/fpu] x86/fpu: Introduce task_disable_lazy_fpu_restore() helper tip-bot for Rik van Riel
2015-02-06 20:02 ` [PATCH 6/8] x86,fpu: use an explicit if/else in switch_fpu_prepare riel
2015-02-17 8:44 ` Borislav Petkov
2015-02-19 11:33 ` [tip:x86/fpu] x86/fpu: Use an explicit if/ else in switch_fpu_prepare() tip-bot for Rik van Riel
2015-02-06 20:02 ` [PATCH 7/8] x86,fpu: use disable_task_lazy_fpu_restore helper riel
2015-02-17 9:00 ` Borislav Petkov
2015-02-17 11:04 ` Oleg Nesterov
2015-02-17 12:11 ` Borislav Petkov
2015-02-19 11:34 ` [tip:x86/fpu] x86/fpu: Use task_disable_lazy_fpu_restore() helper tip-bot for Rik van Riel
2015-02-06 20:02 ` [PATCH 8/8] x86,fpu: also check fpu_lazy_restore when use_eager_fpu riel
2015-02-19 11:34 ` [tip:x86/fpu] x86/fpu: Also check fpu_lazy_restore() when use_eager_fpu() tip-bot for Rik van Riel
2015-02-16 15:26 ` [PATCH 0/8] x86,fpu: various small FPU cleanups and optimizations Rik van Riel
2015-02-16 16:00 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54E2618A.9090203@redhat.com \
--to=riel@redhat.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=sbsiddha@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox