From: Andi Kleen <ak@suse.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
linux-kernel@vger.kernel.org, mingo@elte.hu, tglx@linutronix.de,
akpm@linux-foundation.org
Subject: Re: [patch] x86: fix taking DNA during 64bit sigreturn
Date: Tue, 13 Nov 2007 01:43:04 +0100 [thread overview]
Message-ID: <200711130143.04807.ak@suse.de> (raw)
In-Reply-To: <4738EBB6.7060605@zytor.com>
On Tuesday 13 November 2007 01:11, H. Peter Anvin wrote:
> Andi Kleen wrote:
> >> The *real* fix for this is almost certainly to just get rid of the
> >> 64-bit code entirely, and use the 32-bit code as the base for one single
> >> unified setup.
> >
> > That would likely break the ABI. x86-64 ABI is completely different here
> > -- no ibcs, just pure x86 ISA.
>
> Different ABIs clearly have to be handled,
Well all four cases are quite different.
> but I don't think that is a
> huge deal. The i387 code overall (not just asm/i387.h) is very
> different,
Yes because x86-64 is vastly simpler. e.g. the 64bit path
does not touch the state itself at all. And all the state convert
code moved into the compat layer only. There were also
various other cleanups.
Also 64bit e.g. defers some of the checking to the context
switch, which also simplifies things.
> though, and I find it unlikely that a properly unified code
> is going to be ready and working in the 2.6.24 timeframe.
To be honest it is unclear to me how you can do better than
direct FXSAVE from/to user space on 64bit. Sure you could
put a manual convert pass inbetween like i386, but that
would be rather pointless because it matches 1:1 and in fact would
make the code to be worse (no transparent support of future
FXSAVE extensions) . Not sure what tripped
Linus up so much either. Was it the broken white space?
> I'm exploring
> if a partial merge with high confidence level is feasible; either way, a
> proper merge for 2.6.25 is probably the right thing.
At least on 64bit the result would be probably more complicated
and likely slower code.
If anything it might make sense to add a few more of the 64bit
improvements to 32bit (e.g. delayed exception checking).
The direct FXSAVE path cannot be moved over because it
would break the ABI, otherwise I would have done that
long ago.
BTW if you're looking for real fixes to do iirc some of the FPU
context switch workarounds are missing in KVM which
does mostly its own thing currently.
-Andi
prev parent reply other threads:[~2007-11-13 0:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-11 19:27 [patch] x86: fix taking DNA during 64bit sigreturn Siddha, Suresh B
2007-11-12 19:08 ` Linus Torvalds
2007-11-12 19:33 ` H. Peter Anvin
2007-11-12 21:16 ` Andi Kleen
2007-11-13 0:11 ` H. Peter Anvin
2007-11-13 0:43 ` Andi Kleen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711130143.04807.ak@suse.de \
--to=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox