linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-s390@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux-kernel@vger.kernel.org, y2038@lists.linaro.org,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Mark Rutland <mark.rutland@arm.com>,
	Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 0/5] s390: rework compat wrapper generation
Date: Wed, 16 Jan 2019 14:15:18 +0100	[thread overview]
Message-ID: <20190116131527.2071570-1-arnd@arndb.de> (raw)

Hi Heiko and Martin,

As promised, I gave this a go and changed the SYSCALL_DEFINEx()
infrastructure to always include the wrappers for doing the
31-bit argument conversion on s390 compat mode.

This does three main things:

- The UID16 rework saved a lot of duplicated code, and would
  probably make sense by itself, but is also required as
  we can no longer call sys_*() functions directly after the
  last step.

- Removing the compat_wrapper.c file is of course the main
  goal here, in order to remove the need to maintain the
  compat_wrapper.c file when new system calls get added.
  Unfortunately, this requires adding some complexity in
  syscall_wrapper.h, and trades a small reduction in source
  code lines for a small increase in binary size for
  unused wrappers.

- As an added benefit, the use of syscall_wrapper.h now makes
  it easy to change the syscall wrappers so they no longer
  see all user space register contents, similar to changes
  done in commits fa697140f9a2 ("syscalls/x86: Use 'struct pt_regs'
  based syscall calling convention for 64-bit syscalls") and
  4378a7d4be30 ("arm64: implement syscall wrappers").
  I leave the actual implementation of this for you, if you
  want to do it later.

I did not test the changes at runtime, but I looked at the
generated object code, which seems fine here and includes
the same conversions as before.

      Arnd

Arnd Bergmann (5):
  s390: open-code s390_personality syscall
  ipc: introduce ksys_ipc()/compat_ksys_ipc() for s390
  s390: use generic UID16 implementation
  s390: autogenerate compat syscall wrappers
  s390: remove compat_wrapper.c

 arch/s390/Kconfig                        |   2 +
 arch/s390/include/asm/syscall_wrapper.h  | 136 +++++++++++
 arch/s390/include/uapi/asm/posix_types.h |   6 +
 arch/s390/kernel/Makefile                |   2 +-
 arch/s390/kernel/compat_linux.c          | 235 +------------------
 arch/s390/kernel/compat_wrapper.c        | 186 ---------------
 arch/s390/kernel/entry.S                 |   4 +-
 arch/s390/kernel/sys_s390.c              |  14 +-
 arch/s390/kernel/syscalls/syscall.tbl    | 286 +++++++++++------------
 include/linux/syscalls.h                 |   4 +
 ipc/syscall.c                            |  20 +-
 11 files changed, 322 insertions(+), 573 deletions(-)
 create mode 100644 arch/s390/include/asm/syscall_wrapper.h
 delete mode 100644 arch/s390/kernel/compat_wrapper.c

-- 
2.20.0


             reply	other threads:[~2019-01-16 13:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 13:15 Arnd Bergmann [this message]
2019-01-16 13:15 ` [PATCH 1/5] s390: open-code s390_personality syscall Arnd Bergmann
2019-01-16 13:15 ` [PATCH 2/5] ipc: introduce ksys_ipc()/compat_ksys_ipc() for s390 Arnd Bergmann
2019-01-17 13:29   ` Heiko Carstens
2019-01-17 16:29     ` Arnd Bergmann
2019-01-17 20:13       ` Heiko Carstens
2019-01-16 13:15 ` [PATCH 3/5] s390: use generic UID16 implementation Arnd Bergmann
2019-01-16 13:15 ` [PATCH 4/5] s390: autogenerate compat syscall wrappers Arnd Bergmann
2019-01-17 13:31   ` Heiko Carstens
2019-01-17 16:23     ` Arnd Bergmann
2019-01-21  9:43   ` Heiko Carstens
2019-01-16 13:15 ` [PATCH 5/5] s390: remove compat_wrapper.c Arnd Bergmann
2019-01-16 15:12 ` [PATCH 0/5] s390: rework compat wrapper generation Heiko Carstens
2019-01-17 13:36 ` Heiko Carstens
2019-01-17 16:21   ` Arnd Bergmann
2019-01-17 20:19     ` Heiko Carstens
2019-01-18  8:48       ` Martin Schwidefsky

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=20190116131527.2071570-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=mark.rutland@arm.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=y2038@lists.linaro.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 NNTP newsgroup(s).