public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: PING^2: V2 [PATCH 0/2] x32: Properly pass long to syscall [BZ #25810]
Date: Mon, 20 Apr 2020 07:15:58 -0700	[thread overview]
Message-ID: <CAMe9rOpU_9N-ghXN7GcjkLP2XG_iU+z6yJimC8XgBFjJF2ji5w@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOr=95R57TCKJ2pRK2=MQt1Y1rpQijh3gtmN7eFbwS8Byw@mail.gmail.com>

On Thu, Apr 16, 2020 at 5:52 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Mon, Apr 13, 2020 at 10:51 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > X32 has 32-bit long and pointer with 64-bit off_t.  Since x32 psABI
> > requires that pointers passed in registers must be zero-extended to
> > 64bit, x32 can share many syscall interfaces with LP64.  When a LP64
> > syscall with long and unsigned long arguments is used for x32, these
> > arguments must be properly extended to 64-bit.  Otherwise if the upper
> > 32 bits of the register have undefined value, such a syscall will be
> > rejected by kernel.
> >
> > For syscalls implemented in assembly codes, 'U' is added to syscall
> > signature key letters for unsigned long.  SYSCALL_ULONG_ARG_1 and
> > SYSCALL_ULONG_ARG_2 are passed to syscall-template.S for the first
> > and the second unsigned long arguments if PSEUDOS_HAVE_4_ARGS is
> > defined.  They are used by x32 to zero-extend 32-bit arguments to
> > 64 bits.
> >
> > Tested on i386, x86-64 and x32 as well as with build-many-glibcs.py.
> >
> > OK for master branch?
> >
> > H.J. Lu (2):
> >   Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810]
> >   Add a syscall test for [BZ #25810]
> >
> >  misc/Makefile                               |   2 +-
> >  misc/tst-syscalls.c                         | 146 ++++++++++++++++++++
> >  sysdeps/unix/make-syscalls.sh               |  88 ++++++++++++
> >  sysdeps/unix/syscall-template.S             |  43 +++++-
> >  sysdeps/unix/syscalls.list                  |   6 +-
> >  sysdeps/unix/sysv/linux/syscalls.list       |  14 +-
> >  sysdeps/unix/sysv/linux/x86_64/sysdep.h     |  70 ++++++++--
> >  sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h |  20 ++-
> >  8 files changed, 360 insertions(+), 29 deletions(-)
> >  create mode 100644 misc/tst-syscalls.c
> >
>
> PING:
>
> https://sourceware.org/pipermail/libc-alpha/2020-April/112758.html
>

PING.

-- 
H.J.

      reply	other threads:[~2020-04-20 14:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 17:51 H.J. Lu
2020-04-13 17:51 ` V2 [PATCH 1/2] Add SYSCALL_ULONG_ARG_[12] to " H.J. Lu
2020-04-22 10:42   ` Florian Weimer
2020-04-22 11:44     ` Adhemerval Zanella
2020-04-22 22:01       ` Joseph Myers
2020-04-23 21:34         ` Adhemerval Zanella
2020-04-22 16:09     ` V3 " H.J. Lu
2020-04-25 13:56       ` PING: " H.J. Lu
2020-04-28 13:27         ` PING^2: " H.J. Lu
2020-04-29 12:14       ` Florian Weimer
2020-04-29 12:43         ` H.J. Lu
2020-04-29 12:56           ` Florian Weimer
2020-04-29 12:57             ` H.J. Lu
2020-04-29 13:15         ` H.J. Lu
2020-04-29 13:30           ` Florian Weimer
2020-04-13 17:51 ` V2 [PATCH 2/2] Add a syscall test for " H.J. Lu
2020-04-22 12:25   ` Florian Weimer
2020-04-22 12:43     ` H.J. Lu
2020-04-22 12:47       ` Florian Weimer
2020-04-22 13:42         ` H.J. Lu
2020-04-22 13:46           ` Florian Weimer
2020-04-22 15:52             ` V3 " H.J. Lu
2020-04-22 15:55               ` Florian Weimer
2020-04-16 12:52 ` PING: V2 [PATCH 0/2] x32: Properly pass long to syscall " H.J. Lu
2020-04-20 14:15   ` H.J. Lu [this message]

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=CAMe9rOpU_9N-ghXN7GcjkLP2XG_iU+z6yJimC8XgBFjJF2ji5w@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).