> How about the following (modifiying Linus' suggestion and copying what
> sparc64 already does)?
>
> The assumption is that all arguments have been zero extended by the compat
> syscall entry code, so we just sign extend those that need it.
>
> I am not sure of the sparc64 code below, s390 doesn't seem to follow our
> "all arguments are zero extended" assumption and x86_64 may not need any
> of these wrappers anyway.
On s390 we do already sign extension for int/long and zero extension for
the unsigned parameters. Even though I wasn't aware that we should do zero
extension for _all_ parameters of the compat system calls, regardless of
their type.
In addition we must do pointer conversion to 64 bit, since the compat tasks
have the most significant bit set (to distinguish between 24- and 31-bit
addressing mode).
Therefore I think Linus' suggestion with having something like
compat_fn6(sys_waitif, SARG, UARG, UARG, SARG, UARG);
would be better. Just that we would need something for pointers as well.
And to make things just a bit more complicated: only the first five
parameters are in registers. Number six and the following are already on
the stack. E.g. the compat wrapper for the futex syscall would need extra
assembly code to do conversion on the stack.
Maybe having defines like SARG1..SARG6 that would define assembly code
instead of the register would do the job.
Thanks,
Heiko
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]