From: Arnd Bergmann <arnd@arndb.de>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-kernel@vger.kernel.org, "David S. Miller" <davem@redhat.com>
Subject: Re: compat syscall args
Date: Tue, 1 Jun 2004 11:07:42 +0200 [thread overview]
Message-ID: <200406011107.46096.arnd@arndb.de> (raw)
In-Reply-To: <20040601150633.5f708220.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]
On Tuesday 01 June 2004 07:06, Stephen Rothwell wrote:
> On Sat, 29 May 2004 12:23:19 -0700 "David S. Miller" <davem@redhat.com> wrote:
> > I remember discussing this with Andi Kleen before.
>
> Yeah, you and Andi and I (and others, I think) had this discussion, but it ended like this:
>
> > Subject: Re: [PATCH] Consolidate sys32_utime
> > From: "David S. Miller" <davem@redhat.com>
> >
> > So be it, the convention is that all arguments are zero extended from
> > 32-bits to 64-bits when the syscall is invoked.
>
> Did something change along the way?
I wasn't aware of the convention but it absolutely makes sense. If I find
the time, I'll go through the existing compat_sys_* handlers to see if they
all do sign-extension correctly. Note that on s390, we also need 31-bit
zero-extension for pointers, which is done in architecture-specific code.
Otherwise every compat_* syscall would need to use compat_uptr_t arguments
which appears unnecessarily ugly to me.
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.
Arnd <><
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-06-01 9:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-29 19:23 compat syscall args David S. Miller
2004-05-29 19:31 ` David S. Miller
2004-06-01 13:03 ` Arnd Bergmann
2004-06-01 5:06 ` Stephen Rothwell
2004-06-01 9:07 ` Arnd Bergmann [this message]
2004-06-01 9:24 ` David S. Miller
[not found] <21hGW-h5-5@gated-at.bofh.it>
[not found] ` <229Hi-B1-11@gated-at.bofh.it>
[not found] ` <22drH-3Bc-47@gated-at.bofh.it>
[not found] ` <22dL7-3O8-39@gated-at.bofh.it>
2004-06-01 13:07 ` Andi Kleen
2004-06-01 17:04 ` Anton Blanchard
2004-06-01 21:28 ` David S. Miller
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=200406011107.46096.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.