Re: compat syscall args
From: David S. Miller
Date: Tue Jun 01 2004 - 04:26:55 EST
On Tue, 1 Jun 2004 11:07:42 +0200
Arnd Bergmann <arnd@xxxxxxxx> wrote:
> Also, what should be the conversion for positive signed arguments like the
> futex 'op' value? Sign-extension would be the formally correct solution,
> but simply using the zero-extended value (like we do in most places) works
> just as well.
Personally I think it makes more sense to do what sparc64 does
1) The syscall32 entry code extends each arg in a fixed way.
Ie. arg0-3 are zero-extended, arg4-5 are sign-extended
or whatever. I posted the choices we use on sparc64 just
the other day.
2) For each syscall where this default set of extensions is
not correct, little assembler or C stubs are used to correct
the extensions made by the default code.
It is the most optimal solution. We only need 13 or so stubs
on sparc64 with the defaults we've choosen.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/