Skip to contentSkip to conversation

BUG: Global FPU corruption in 2.2

DISCUSSION [email protected] 1 participant 1 message Apr 24, 2001

lore
Share & tools
lore
#0 lore raw

Erik Paulson <[email protected]> on 04/24/2001 01:14:27 AM

To: Christian Ehrhardt <[email protected]>
cc: [email protected], [email protected] (bcc: Amol Lad/HSS)

Subject: Re: BUG: Global FPU corruption in 2.2

Quoted 7 lines · Christian Ehrhardt
Quoted 5 lines · Victor Zandy

We have found that one of our programs can cause system-wide corruption of the x86 FPU under 2.2.16 and 2.2.17. That is, after we run this program, the FPU gives bad results to all subsequent processes.

<...>

Quoted 4 lines

3.) It might be interesting to know if the problem can be triggered:
a) If pi doesn't fork, i.e. just one process calculating pi and another one doing the attach/detach.

Yes, we are still able to reproduce it without calling fork (the new program just calls
do_pi() a bunch of times, and then we attach and detach to that process)

Quoted 2 lines

b) If pi doesn't do FPU Operations, i.e. only the children call do_pi.

You seem to need to attach and detach to a program using the fpu - running pt on a
process that is just busy-looping over and over some integer adds does not seem to
while running pi on the machine at the same time, but not attaching to it does not
seem to affect the floating point state.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

well... during context switching.. call to unlazy_fpu() does the following

        if (current->flags & PF_USEDFPU)
          save_fpu();

somebody earlier pointed out, for the possible race when in sys_ptrace, at the time of attach we modify child->flags.
It really looks again strange that it is software that is causing the problem as the code to handle FPU looks pretty clean.
still can we check current->flags when the problem occurs ?

Amol

-Erik

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/