]> err.no Git - linux-2.6/commit
[PATCH] uml: fix syscall stubs
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Mon, 7 Nov 2005 08:58:46 +0000 (00:58 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 7 Nov 2005 15:53:30 +0000 (07:53 -0800)
commit4f0272415ad1867cea2a7ef5659769243ae50fbe
tree5daba11ac90defc604399aa7ff41fa11b8cd088a
parent953206858070e5921b9d5931c293ec983a6790cb
[PATCH] uml: fix syscall stubs

Jeff Dike noted that the assembly code for syscall stubs is misassembled with
GCC 3.2.3: the values copied in registers weren't preserved between one asm()
and the following one.

So I fixed the thing by rewriting the __asm__ constraints more like unistd.h
ones.

Note: in syscall6 case I had to add one more instruction (i.e.  moving arg6 in
eax and shuffling things around) - it's needed for the function to be valid in
general (we can't load the value from the stack, relative to ebp, because we
change it), but could be avoided since we actually use a constant as param 6.

The only fix would be to turn stub_syscall6 to a macro and use a "i"
constraint for arg6 (i.e., specify it's a constant value).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/include/sysdep-i386/stub.h
arch/um/include/sysdep-x86_64/stub.h