[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18482.60491.764019.292031@harpo.it.uu.se>
Date: Tue, 20 May 2008 17:20:43 +0200
From: Mikael Pettersson <mikpe@...uu.se>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Mikael Pettersson <mikpe@...uu.se>,
Andi Kleen <andi@...stfloor.org>,
Suresh Siddha <suresh.b.siddha@...el.com>, mingo@...e.hu,
tglx@...utronix.de, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, roland@...hat.com, drepper@...hat.com,
Hongjiu.lu@...el.com, linux-kernel@...r.kernel.org,
arjan@...ux.intel.com, rmk+lkml@....linux.org.uk, dan@...ian.org,
asit.k.mallick@...el.com
Subject: Re: [RFC] x86: xsave/xrstor support, ucontext_t extensions
H. Peter Anvin writes:
> Mikael Pettersson wrote:
> > >
> > > Are they always zeroed in earlier CPUs though? If not that wouldn't
> > > work 100% reliably because whatever cookie you put in could have been
> > > there before by chance.
> >
> > I wrote a test program (fill an area with zeroes, fxsave, inspect
> > reserved fields, then fill it with ones, fxsave, inspect again),
> > and all processors appear to just not write anything to the reserved
> > fields after the last xmm register. (Tested on an old Mobile Athlon64,
> > Opteron 280, P4 Xeon, Pentium-D, and C2 Xeon E5345.)
> >
> > So the question now is what if anything has the Linux kernel written
> > to those reserved fields. (Looking..) Hmm, signal delivery on x86-64
> > seems to do fxsave directly to the fxsave area in the user's sigframe,
> > which would imply that the reserved fields have unpredictable values.
> >
>
> OK, so that's not a usable path unless we can find some area in the
> existing data set to put a flag. Groan.
An ugly workaround could be to start clearing one of these fields,
and say that the data there is only valid for kernels >= 2.6.26.
(I said it was ugly...)
Or we go back to stashing a flag in uc_flags (which is kosher),
and try to figure out how to mark non-rt sigframes.
/Mikael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists