qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 00/36] linux-user: Signal trampolines and vdsos


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 00/36] linux-user: Signal trampolines and vdsos
Date: Thu, 8 Jul 2021 12:55:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

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
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]