From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
akpm@osdl.org, linux-kernel@vger.kernel.org, torvalds@osdl.org,
ak@suse.de, linuxppc64-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] compat: add compat functions for *at syscalls
Date: Tue, 7 Feb 2006 10:31:54 +0100 [thread overview]
Message-ID: <20060207093154.GA9311@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20060207174017.5e3b0ce0.sfr@canb.auug.org.au>
> 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
next prev parent reply other threads:[~2006-02-07 9:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 23:56 Stephen Rothwell
2006-02-07 0:01 ` David S. Miller
2006-02-07 0:27 ` Stephen Rothwell
2006-02-07 1:15 ` Linus Torvalds
2006-02-07 8:44 ` David S. Miller
2006-02-07 8:43 ` David S. Miller
2006-02-07 9:39 ` Andi Kleen
2006-02-07 10:56 ` David S. Miller
2006-02-07 6:40 ` Stephen Rothwell
2006-02-07 9:31 ` Heiko Carstens [this message]
2006-02-07 13:29 ` Heiko Carstens
2006-02-07 22:57 ` David S. Miller
2006-02-07 9:25 ` Andi Kleen
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=20060207093154.GA9311@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@osdl.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
Powered by JetHome