[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080520175325.GE30034@linux-os.sc.intel.com>
Date: Tue, 20 May 2008 10:53:25 -0700
From: Suresh Siddha <suresh.b.siddha@...el.com>
To: Mikael Pettersson <mikpe@...uu.se>
Cc: "H. Peter Anvin" <hpa@...or.com>, 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
On Tue, May 20, 2008 at 05:20:43PM +0200, Mikael Pettersson wrote:
> H. Peter Anvin writes:
> > Mikael Pettersson wrote:
> > > 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.
This issue of not-zeroing, is present in only 64bit kernels and for 64bit apps,
right?
64bit app signal handling uses only rt_frame, so we can add an uc_flag for
them and for 32bit apps, kernel was always zero'ing the reserved bits
at the end of _fpstate.
In short, for non-rt frames, they can check the reserved bits at the end
of fpstate frame and for rt-frames (perhaps even for 32bit rt frame handling)
apps can check for uc_flag aswell, for extended state presence. Is this
good enough?
thanks,
suresh
--
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