All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, laurent@vivier.eu,
	"Maciej W. Rozycki" <macro@orcam.me.uk>
Subject: Re: [PATCH v2 00/36] linux-user: Signal trampolines and vdsos
Date: Thu, 8 Jul 2021 12:55:29 +0200	[thread overview]
Message-ID: <9544c420-622d-8297-3a47-0dfb95a8da23@amsat.org> (raw)
In-Reply-To: <20210706234932.356913-1-richard.henderson@linaro.org>

On 7/7/21 1:48 AM, Richard Henderson wrote:
> Supercedes: <20210619034329.532318-1-richard.henderson@linaro.org>
> ("[PATCH 00/12] linux-user: Load a vdso for x86_64 and hppa")
> 
> Supercedes: <20210618192951.125651-1-richard.henderson@linaro.org>
> ("[PATCH v2 00/23] linux-user: Move signal trampolines to new page")
> 
> Changes for v2:
>   * Add vdsos for aarch64, arm, i386, riscv.
>   * Drop setup_sigtramp for any target with a vdso.
>   * Drop arm v1 signal support.
>   * Simplify ppc encode_trampoline.
> 
> The remaining linux kernel targets that support vdsos are:
> 
> MIPS is particularly troublesome because of a multitude of ISAs.
> The kernel doesn't even support them all, disabling the vdso for
> micromips (and probably ignores nanomips entirely).  Though I'll
> note that linux-user/mips does not handle any of the modern
> ISAs -- install_sigtramp is strictly MIPS I.  In addition there
> are 3 ELF ABIs, so there's some combinatorial explosion in the
> set of vdsos that would need to be pre-built.  Perhaps put this
> off until we can build these on demand.

Cc'ing Maciej to keep him aware, but FWIW, this sounds good to me.

> PPC is troublesome because of __kernel_get_syscall_map.
> In addition to needing to collect the set of syscalls that qemu
> supports, we'd need to update the vdso every time we add support
> for a new syscall.  And then there are the 3 ELF ABIs.  So again
> put this off until we can build these on demand.
> 
> S390x shouldn't be troublesome, I just didn't finish them all.
> 
> 
> r~
> 
> 
> Richard Henderson (36):
>   linux-user: Add infrastructure for a signal trampoline page
>   linux-user: Fix style problems in linuxload.c
>   linux-user: Introduce imgsrc_read, imgsrc_read_alloc
>   linux-user: Tidy loader_exec
>   linux-user: Do not clobber bprm_buf swapping ehdr
>   linux-user: Use ImageSource in load_elf_image
>   linux-user: Use ImageSource in load_symbols
>   linux-user: Replace bprm->fd with bprm->src.fd
>   linux-user: Introduce imgsrc_mmap
>   linux-user: Load vdso image if available
>   linux-user: Add gen-vdso tool
>   linux-user/aarch64: Add vdso and use it for rt_sigreturn
>   linux-user/arm: Drop v1 signal frames
>   linux-user/arm: Drop "_v2" from symbols in signal.c
>   target/arm: Add isar_feature_aa32_a32
>   linux-user/arm: Add vdso and use it for rt_sigreturn
>   linux-user/alpha: Implement setup_sigtramp
>   linux-user/cris: Implement setup_sigtramp
>   linux-user/hexagon: Implement setup_sigtramp
>   linux-user/hppa: Add vdso and use it for rt_sigreturn
>   linux-user/x86_64: Raise SIGSEGV if SA_RESTORER not set
>   linux-user/i386: Add vdso and use it for sigreturn
>   linux-user/x86_64: Add vdso
>   linux-user/m68k: Implement setup_sigtramp
>   linux-user/microblaze: Implement setup_sigtramp
>   linux-user/mips: Tidy install_sigtramp
>   linux-user/mips: Implement setup_sigtramp
>   linux-user/nios2: Document non-use of setup_sigtramp
>   linux-user/openrisc: Implement setup_sigtramp
>   target/ppc: Simplify encode_trampoline
>   linux-user/ppc: Implement setup_sigtramp
>   linux-user/riscv: Add vdso and use it for sigreturn
>   linux-user/s390x: Implement setup_sigtramp
>   linux-user/sh4: Implement setup_sigtramp
>   linux-user/sparc: Implement setup_sigtramp
>   linux-user/xtensa: Implement setup_sigtramp
> 
>  linux-user/alpha/target_signal.h      |   1 +
>  linux-user/cris/target_signal.h       |   2 +
>  linux-user/hexagon/target_signal.h    |   2 +
>  linux-user/m68k/target_signal.h       |   2 +
>  linux-user/microblaze/target_signal.h |   2 +
>  linux-user/mips/target_signal.h       |   1 +
>  linux-user/mips64/target_signal.h     |   2 +
>  linux-user/nios2/target_signal.h      |   3 +
>  linux-user/openrisc/target_signal.h   |   2 +
>  linux-user/ppc/target_signal.h        |   2 +
>  linux-user/qemu.h                     |  67 +++-
>  linux-user/s390x/target_signal.h      |   2 +
>  linux-user/sh4/target_signal.h        |   2 +
>  linux-user/sparc/target_signal.h      |   4 +
>  linux-user/xtensa/target_signal.h     |   2 +
>  target/arm/cpu.h                      |   5 +
>  linux-user/aarch64/signal.c           |  17 +-
>  linux-user/alpha/signal.c             |  34 +-
>  linux-user/arm/signal.c               | 500 ++++++--------------------
>  linux-user/cris/signal.c              |  29 +-
>  linux-user/elfload.c                  | 367 ++++++++++++-------
>  linux-user/flatload.c                 |   8 +-
>  linux-user/gen-vdso.c                 | 223 ++++++++++++
>  linux-user/hexagon/signal.c           |  19 +-
>  linux-user/hppa/signal.c              |   8 +-
>  linux-user/i386/signal.c              |  50 +--
>  linux-user/linuxload.c                | 171 ++++++---
>  linux-user/m68k/signal.c              |  47 ++-
>  linux-user/microblaze/signal.c        |  24 +-
>  linux-user/mips/signal.c              |  39 +-
>  linux-user/openrisc/signal.c          |  24 +-
>  linux-user/ppc/signal.c               |  40 +--
>  linux-user/riscv/signal.c             |  10 +-
>  linux-user/s390x/signal.c             |  24 +-
>  linux-user/sh4/signal.c               |  40 ++-
>  linux-user/signal.c                   |   3 +
>  linux-user/sparc/signal.c             |  32 +-
>  linux-user/xtensa/signal.c            |  50 +--
>  target/arm/cpu_tcg.c                  |   7 +
>  linux-user/gen-vdso-elfn.c.inc        | 306 ++++++++++++++++
>  linux-user/aarch64/Makefile.vdso      |  11 +
>  linux-user/aarch64/meson.build        |  11 +
>  linux-user/aarch64/vdso-be.so         | Bin 0 -> 6000 bytes
>  linux-user/aarch64/vdso-le.so         | Bin 0 -> 6000 bytes
>  linux-user/aarch64/vdso.S             |  77 ++++
>  linux-user/aarch64/vdso.ld            |  74 ++++
>  linux-user/arm/Makefile.vdso          |  17 +
>  linux-user/arm/meson.build            |  18 +
>  linux-user/arm/vdso-arm-be.so         | Bin 0 -> 5648 bytes
>  linux-user/arm/vdso-arm-le.so         | Bin 0 -> 5648 bytes
>  linux-user/arm/vdso-thm-be.so         | Bin 0 -> 5620 bytes
>  linux-user/arm/vdso-thm-le.so         | Bin 0 -> 5620 bytes
>  linux-user/arm/vdso.S                 | 209 +++++++++++
>  linux-user/arm/vdso.ld                |  74 ++++
>  linux-user/hppa/Makefile.vdso         |   6 +
>  linux-user/hppa/meson.build           |   6 +
>  linux-user/hppa/vdso.S                | 149 ++++++++
>  linux-user/hppa/vdso.ld               |  75 ++++
>  linux-user/hppa/vdso.so               | Bin 0 -> 5196 bytes
>  linux-user/i386/Makefile.vdso         |   5 +
>  linux-user/i386/meson.build           |   7 +
>  linux-user/i386/vdso.S                | 149 ++++++++
>  linux-user/i386/vdso.ld               |  76 ++++
>  linux-user/i386/vdso.so               | Bin 0 -> 5528 bytes
>  linux-user/meson.build                |   8 +-
>  linux-user/riscv/Makefile.vdso        |  11 +
>  linux-user/riscv/meson.build          |   9 +
>  linux-user/riscv/vdso-32.so           | Bin 0 -> 5624 bytes
>  linux-user/riscv/vdso-64.so           | Bin 0 -> 6120 bytes
>  linux-user/riscv/vdso.S               | 207 +++++++++++
>  linux-user/riscv/vdso.ld              |  76 ++++
>  linux-user/x86_64/Makefile.vdso       |   5 +
>  linux-user/x86_64/meson.build         |   6 +
>  linux-user/x86_64/vdso.S              | 122 +++++++
>  linux-user/x86_64/vdso.ld             |  74 ++++
>  linux-user/x86_64/vdso.so             | Bin 0 -> 6008 bytes
>  76 files changed, 2866 insertions(+), 789 deletions(-)
>  create mode 100644 linux-user/gen-vdso.c
>  create mode 100644 linux-user/gen-vdso-elfn.c.inc
>  create mode 100644 linux-user/aarch64/Makefile.vdso
>  create mode 100644 linux-user/aarch64/meson.build
>  create mode 100755 linux-user/aarch64/vdso-be.so
>  create mode 100755 linux-user/aarch64/vdso-le.so
>  create mode 100644 linux-user/aarch64/vdso.S
>  create mode 100644 linux-user/aarch64/vdso.ld
>  create mode 100644 linux-user/arm/Makefile.vdso
>  create mode 100755 linux-user/arm/vdso-arm-be.so
>  create mode 100755 linux-user/arm/vdso-arm-le.so
>  create mode 100755 linux-user/arm/vdso-thm-be.so
>  create mode 100755 linux-user/arm/vdso-thm-le.so
>  create mode 100644 linux-user/arm/vdso.S
>  create mode 100644 linux-user/arm/vdso.ld
>  create mode 100644 linux-user/hppa/Makefile.vdso
>  create mode 100644 linux-user/hppa/vdso.S
>  create mode 100644 linux-user/hppa/vdso.ld
>  create mode 100755 linux-user/hppa/vdso.so
>  create mode 100644 linux-user/i386/Makefile.vdso
>  create mode 100644 linux-user/i386/vdso.S
>  create mode 100644 linux-user/i386/vdso.ld
>  create mode 100755 linux-user/i386/vdso.so
>  create mode 100644 linux-user/riscv/Makefile.vdso
>  create mode 100644 linux-user/riscv/meson.build
>  create mode 100755 linux-user/riscv/vdso-32.so
>  create mode 100755 linux-user/riscv/vdso-64.so
>  create mode 100644 linux-user/riscv/vdso.S
>  create mode 100644 linux-user/riscv/vdso.ld
>  create mode 100644 linux-user/x86_64/Makefile.vdso
>  create mode 100644 linux-user/x86_64/vdso.S
>  create mode 100644 linux-user/x86_64/vdso.ld
>  create mode 100755 linux-user/x86_64/vdso.so
> 



  parent reply	other threads:[~2021-07-08 10:57 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 23:48 [PATCH v2 00/36] linux-user: Signal trampolines and vdsos Richard Henderson
2021-07-06 23:48 ` [PATCH v2 01/36] linux-user: Add infrastructure for a signal trampoline page Richard Henderson
2021-07-06 23:48 ` [PATCH v2 02/36] linux-user: Fix style problems in linuxload.c Richard Henderson
2021-07-07 19:22   ` Laurent Vivier
2021-07-06 23:48 ` [PATCH v2 03/36] linux-user: Introduce imgsrc_read, imgsrc_read_alloc Richard Henderson
2021-07-06 23:49 ` [PATCH v2 04/36] linux-user: Tidy loader_exec Richard Henderson
2021-07-07  8:21   ` Philippe Mathieu-Daudé
2021-07-06 23:49 ` [PATCH v2 05/36] linux-user: Do not clobber bprm_buf swapping ehdr Richard Henderson
2021-07-06 23:49 ` [PATCH v2 06/36] linux-user: Use ImageSource in load_elf_image Richard Henderson
2021-07-06 23:49 ` [PATCH v2 07/36] linux-user: Use ImageSource in load_symbols Richard Henderson
2021-07-06 23:49 ` [PATCH v2 08/36] linux-user: Replace bprm->fd with bprm->src.fd Richard Henderson
2021-07-06 23:49 ` [PATCH v2 09/36] linux-user: Introduce imgsrc_mmap Richard Henderson
2021-07-06 23:49 ` [PATCH v2 10/36] linux-user: Load vdso image if available Richard Henderson
2021-07-06 23:49 ` [PATCH v2 11/36] linux-user: Add gen-vdso tool Richard Henderson
2021-07-06 23:49 ` [PATCH v2 12/36] linux-user/aarch64: Add vdso and use it for rt_sigreturn Richard Henderson
2021-07-06 23:49 ` [PATCH v2 13/36] linux-user/arm: Drop v1 signal frames Richard Henderson
2021-07-07  8:19   ` Philippe Mathieu-Daudé
2021-07-07 17:35   ` Peter Maydell
2021-07-06 23:49 ` [PATCH v2 14/36] linux-user/arm: Drop "_v2" from symbols in signal.c Richard Henderson
2021-07-07  8:19   ` Philippe Mathieu-Daudé
2021-07-06 23:49 ` [PATCH v2 15/36] target/arm: Add isar_feature_aa32_a32 Richard Henderson
2021-07-06 23:49 ` [PATCH v2 16/36] linux-user/arm: Add vdso and use it for rt_sigreturn Richard Henderson
2021-07-06 23:49 ` [PATCH v2 17/36] linux-user/alpha: Implement setup_sigtramp Richard Henderson
2021-07-06 23:49 ` [PATCH v2 18/36] linux-user/cris: " Richard Henderson
2021-07-06 23:49 ` [PATCH v2 19/36] linux-user/hexagon: " Richard Henderson
2021-07-12 23:08   ` Taylor Simpson
2021-07-06 23:49 ` [PATCH v2 20/36] linux-user/hppa: Add vdso and use it for rt_sigreturn Richard Henderson
2021-07-06 23:49 ` [PATCH v2 21/36] linux-user/x86_64: Raise SIGSEGV if SA_RESTORER not set Richard Henderson
2021-07-06 23:49 ` [PATCH v2 22/36] linux-user/i386: Add vdso and use it for sigreturn Richard Henderson
2021-07-07 20:28   ` Richard Henderson
2021-07-06 23:49 ` [PATCH v2 23/36] linux-user/x86_64: Add vdso Richard Henderson
2021-07-06 23:49 ` [PATCH v2 24/36] linux-user/m68k: Implement setup_sigtramp Richard Henderson
2021-07-06 23:49 ` [PATCH v2 25/36] linux-user/microblaze: " Richard Henderson
2021-07-06 23:49 ` [PATCH v2 26/36] linux-user/mips: Tidy install_sigtramp Richard Henderson
2021-07-06 23:49 ` [PATCH v2 27/36] linux-user/mips: Implement setup_sigtramp Richard Henderson
2021-07-06 23:49 ` [PATCH v2 28/36] linux-user/nios2: Document non-use of setup_sigtramp Richard Henderson
2021-07-06 23:49 ` [PATCH v2 29/36] linux-user/openrisc: Implement setup_sigtramp Richard Henderson
2021-07-06 23:49 ` [PATCH v2 30/36] target/ppc: Simplify encode_trampoline Richard Henderson
2021-07-06 23:49 ` [PATCH v2 31/36] linux-user/ppc: Implement setup_sigtramp Richard Henderson
2021-07-06 23:49 ` [PATCH v2 32/36] linux-user/riscv: Add vdso and use it for sigreturn Richard Henderson
2021-07-06 23:49   ` Richard Henderson
2021-07-06 23:49 ` [PATCH v2 33/36] linux-user/s390x: Implement setup_sigtramp Richard Henderson
2021-07-06 23:49 ` [PATCH v2 34/36] linux-user/sh4: " Richard Henderson
2021-07-06 23:49 ` [PATCH v2 35/36] linux-user/sparc: " Richard Henderson
2021-07-06 23:49 ` [PATCH v2 36/36] linux-user/xtensa: " Richard Henderson
2021-07-08 10:55 ` Philippe Mathieu-Daudé [this message]
2021-09-01  9:36 ` [PATCH v2 00/36] linux-user: Signal trampolines and vdsos Peter Maydell
2021-09-03 13:39   ` Alex Bennée
2021-09-03 15:39     ` Richard Henderson

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=9544c420-622d-8297-3a47-0dfb95a8da23@amsat.org \
    --to=f4bug@amsat.org \
    --cc=alex.bennee@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=macro@orcam.me.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@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 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.