From: Chuck Ebbert <76306.1226@compuserve.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
Linus Torvalds <torvalds@osdl.org>,
linux-stable <stable@kernel.org>
Subject: [patch 2.6.17-rc3] i386: fix broken FP exception handling
Date: Sat, 29 Apr 2006 14:07:49 -0400 [thread overview]
Message-ID: <200604291409_MC3-1-BE50-16AD@compuserve.com> (raw)
The FXSAVE information leak patch introduced a bug in FP exception
handling: it clears FP exceptions only when there are already
none outstanding. Mikael Pettersson reported that causes problems
with the Erlang runtime and has tested this fix.
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Acked-by: Mikael Pettersson <mikpe@it.uu.se>
---
The same bug is in 2.6.16.9+ and this patch applies there as well.
--- 2.6.17-rc3-d4.orig/include/asm-i386/i387.h
+++ 2.6.17-rc3-d4/include/asm-i386/i387.h
@@ -58,13 +58,13 @@ static inline void __save_init_fpu( stru
alternative_input(
"fnsave %[fx] ;fwait;" GENERIC_NOP8 GENERIC_NOP4,
"fxsave %[fx]\n"
- "bt $7,%[fsw] ; jc 1f ; fnclex\n1:",
+ "bt $7,%[fsw] ; jnc 1f ; fnclex\n1:",
X86_FEATURE_FXSR,
[fx] "m" (tsk->thread.i387.fxsave),
[fsw] "m" (tsk->thread.i387.fxsave.swd) : "memory");
/* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception
is pending. Clear the x87 state here by setting it to fixed
- values. __per_cpu_offset[0] is a random variable that should be in L1 */
+ values. safe_address is a random variable that should be in L1 */
alternative_input(
GENERIC_NOP8 GENERIC_NOP2,
"emms\n\t" /* clear stack tags */
--
Chuck
"Penguins don't come from next door, they come from the Antarctic!"
next reply other threads:[~2006-04-29 18:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-29 18:07 Chuck Ebbert [this message]
2006-04-30 8:42 ` [patch 2.6.17-rc3] i386: fix broken FP exception handling Andi Kleen
2006-05-01 20:35 ` [stable] " Greg KH
-- strict thread matches above, loose matches on Subject: below --
2006-04-29 18:39 Mikael Pettersson
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=200604291409_MC3-1-BE50-16AD@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@osdl.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