Re: _fpstate_fxsave & al

From: Gareth Hughes (gareth@precisioninsight.com)
Date: Tue Jun 06 2000 - 00:46:48 EST


Ulrich Drepper wrote:
>
> - concatenate the new structure after the old
>
> - when creating the signal context fill in the old fpstate with the
> data retrieved from the old one or at least leave the fp regs empty
>
> - move the magic word somewhere in the range of the old structure. I
> propsed misuing the csseg field which sould work just fine.

The csseg field will be filled in with a non-zero value by a pre-2.4
kernel, and thus will be incorrectly interpreted as a FXSAVE FPU format
and you'll get a segfault. Reversing the convention (ie. using zero to
indicate the FXSAVE format), won't help as the entire FPU context, be it
the regular FSAVE or new FXSAVE format, is used to restore the task's
hardware environment when the signal handler returns. You really don't
want to be messing with the internal fields.

I don't see how this solution is better than the one I've put forward -
perhaps I'm missing something. Alan (or anyone else), do you have any
input into this discussion?

-- Gareth

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:24 EST