Magellan Linux

Annotation of /trunk/kernel26-magellan/patches-2.6.16-r10/0124-2.6.16.12-broken-fp-exception.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (hide annotations) (download)
Thu May 11 19:09:22 2006 UTC (18 years ago) by niro
File size: 1535 byte(s)
import

1 niro 70 From: Chuck Ebbert <76306.1226@compuserve.com>
2     Date: Sat, 29 Apr 2006 18:07:49 +0000 (-0400)
3     Subject: [PATCH] i386: fix broken FP exception handling
4     X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/stable/linux-2.6.16.y.git;a=commitdiff;h=6584014ec33ed34c5bf6c5af20a0951069bea7a9
5    
6     [PATCH] i386: fix broken FP exception handling
7    
8     The FXSAVE information leak patch introduced a bug in FP exception
9     handling: it clears FP exceptions only when there are already
10     none outstanding. Mikael Pettersson reported that causes problems
11     with the Erlang runtime and has tested this fix.
12    
13     Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
14     Acked-by: Mikael Pettersson <mikpe@it.uu.se>
15     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16     ---
17    
18     --- a/include/asm-i386/i387.h
19     +++ b/include/asm-i386/i387.h
20     @@ -58,13 +58,13 @@ static inline void __save_init_fpu( stru
21     alternative_input(
22     "fnsave %[fx] ;fwait;" GENERIC_NOP8 GENERIC_NOP4,
23     "fxsave %[fx]\n"
24     - "bt $7,%[fsw] ; jc 1f ; fnclex\n1:",
25     + "bt $7,%[fsw] ; jnc 1f ; fnclex\n1:",
26     X86_FEATURE_FXSR,
27     [fx] "m" (tsk->thread.i387.fxsave),
28     [fsw] "m" (tsk->thread.i387.fxsave.swd) : "memory");
29     /* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception
30     is pending. Clear the x87 state here by setting it to fixed
31     - values. __per_cpu_offset[0] is a random variable that should be in L1 */
32     + values. safe_address is a random variable that should be in L1 */
33     alternative_input(
34     GENERIC_NOP8 GENERIC_NOP2,
35     "emms\n\t" /* clear stack tags */