lkml.org 
[lkml]   [1996]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectBug in arch/i386/signal.c
Date
Hi!

Apparently, it was bug. When used_math==0, random (zero, to be more
exact) "FPU state" would be saved on stack and "restored" on exit from
signal handler.
I believe, that SMP part is buggy too, but not fixed it.

Alexey Kuznetsov

static inline struct _fpstate * save_i387_hard(struct _fpstate * buf)
{
#ifdef __SMP__
if (current->flags & PF_USEDFPU) {
__asm__ __volatile__("fnsave %0":"=m" (current->tss.i387.hard));
stts();
current->flags &= ~PF_USEDFPU;
}
#else
#ifndef NO_ANK_FIX
if (!current->used_math)
return NULL;
#endif
if (current == last_task_used_math) {
__asm__ __volatile__("fnsave %0":"=m" (current->tss.i387.hard));
last_task_used_math = NULL;
__asm__ __volatile__("fwait"); /* not needed on 486+ */
stts();
}
#endif
current->tss.i387.hard.status = current->tss.i387.hard.swd;


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.021 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site