lkml.org 
[lkml]   [2007]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] x86: fix taking DNA during 64bit sigreturn
Date
> 
> 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.

I always thought direct FXSAVE from/to user space to be a cute trick, but yes
the exception Suresh noticed makes it lose some of its beauty.

> The 32-bit code should be largely a superset of the 64-bit code
> anyway, since it has to handle more cases, and does it more cleanly.

If you consider compat code 64bit handles as many cases as 32bit.

> which isn't exactly pretty, but the memory address generation works fine
> in 32-bit code too, and the rex override is easily done with
>
> #ifdef CONFIG_X86_64
> #define REX64 "rex64/"
> #else
> #define REX64 ""
> #endif
>
> and then you just use
>
> REX64 "fxsave"

That didn't work on older assemblers.

> But maybe I'm missing some reason why it doesn't matter. The 32-bit code
> was fixed back in 2003 (commit 5bff44fc272b948a85e893a007d01b9dfb3ad04f

64bit FPU semantics are somewhat different. I don't remember if this
particular issue was addressed or not, but I fixed a few shared
bugs in a quite different way on 64bit vs 32bit. If anybody wants
to change something here don't assume they are the same.

From a cursory look it's probably broken though.

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

\
 
 \ /
  Last update: 2007-11-12 22:21    [W:0.113 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site