mbox series

[v4,00/18] linux-user: Implement VDSOs

Message ID 20230816180338.572576-1-richard.henderson@linaro.org
Headers show
Series linux-user: Implement VDSOs | expand

Message

Richard Henderson Aug. 16, 2023, 6:03 p.m. UTC
Still no integrated cross-compile, however:

Changes for v4:
  * Force all vdso to have a single load segment.
    This will prevent problems with varying host/guest page size.
  * Tidy some of the assembly with macros.
  * Implement loongarch, ppc, s390x.

Just in case the list eats a binary:
  https://gitlab.com/rth7680/qemu/-/tree/lu-vdso


r~


Richard Henderson (18):
  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: Load vdso image if available
  linux-user: Add gen-vdso tool
  linux-user/i386: Add vdso
  linux-user/x86_64: Add vdso
  linux-user/aarch64: Add vdso
  linux-user/arm: Add vdso
  linux-user/hppa: Add vdso
  linux-user/riscv: Add vdso
  linux-user/loongarch64: Add vdso
  linux-user/ppc: Add vdso
  linux-user/s390x: Rename __SIGNAL_FRAMESIZE to STACK_FRAME_OVERHEAD
  linux-user/s390x: Add vdso

 linux-user/hppa/vdso-asmoffset.h        |  12 +
 linux-user/i386/vdso-asmoffset.h        |   6 +
 linux-user/loader.h                     |  60 +++-
 linux-user/loongarch64/vdso-asmoffset.h |   8 +
 linux-user/ppc/vdso-asmoffset.h         |  20 ++
 linux-user/riscv/vdso-asmoffset.h       |   9 +
 linux-user/s390x/vdso-asmoffset.h       |   2 +
 linux-user/arm/signal.c                 |  30 +-
 linux-user/elfload.c                    | 381 +++++++++++++++---------
 linux-user/flatload.c                   |   8 +-
 linux-user/gen-vdso.c                   | 223 ++++++++++++++
 linux-user/hppa/signal.c                |  24 +-
 linux-user/i386/signal.c                |  11 +
 linux-user/linuxload.c                  | 137 +++++++--
 linux-user/loongarch64/signal.c         |  17 +-
 linux-user/ppc/signal.c                 |  31 +-
 linux-user/riscv/signal.c               |   8 +
 linux-user/s390x/signal.c               |   7 +-
 linux-user/gen-vdso-elfn.c.inc          | 314 +++++++++++++++++++
 linux-user/aarch64/Makefile.vdso        |  12 +
 linux-user/aarch64/meson.build          |  12 +
 linux-user/aarch64/vdso-be.so           | Bin 0 -> 3216 bytes
 linux-user/aarch64/vdso-le.so           | Bin 0 -> 3216 bytes
 linux-user/aarch64/vdso.S               |  73 +++++
 linux-user/aarch64/vdso.ld              |  72 +++++
 linux-user/arm/Makefile.vdso            |  17 ++
 linux-user/arm/meson.build              |  18 ++
 linux-user/arm/vdso-arm-be.so           | Bin 0 -> 2712 bytes
 linux-user/arm/vdso-arm-le.so           | Bin 0 -> 2712 bytes
 linux-user/arm/vdso-thm-be.so           | Bin 0 -> 2684 bytes
 linux-user/arm/vdso-thm-le.so           | Bin 0 -> 2684 bytes
 linux-user/arm/vdso.S                   | 193 ++++++++++++
 linux-user/arm/vdso.ld                  |  67 +++++
 linux-user/hppa/Makefile.vdso           |   6 +
 linux-user/hppa/meson.build             |   6 +
 linux-user/hppa/vdso.S                  | 165 ++++++++++
 linux-user/hppa/vdso.ld                 |  77 +++++
 linux-user/hppa/vdso.so                 | Bin 0 -> 2104 bytes
 linux-user/i386/Makefile.vdso           |   5 +
 linux-user/i386/meson.build             |   7 +
 linux-user/i386/vdso.S                  | 143 +++++++++
 linux-user/i386/vdso.ld                 |  76 +++++
 linux-user/i386/vdso.so                 | Bin 0 -> 2672 bytes
 linux-user/loongarch64/Makefile.vdso    |   7 +
 linux-user/loongarch64/meson.build      |   4 +
 linux-user/loongarch64/vdso.S           | 130 ++++++++
 linux-user/loongarch64/vdso.ld          |  73 +++++
 linux-user/loongarch64/vdso.so          | Bin 0 -> 3560 bytes
 linux-user/meson.build                  |   9 +-
 linux-user/ppc/Makefile.vdso            |  18 ++
 linux-user/ppc/meson.build              |  12 +
 linux-user/ppc/vdso-32.ld               |  70 +++++
 linux-user/ppc/vdso-32.so               | Bin 0 -> 3020 bytes
 linux-user/ppc/vdso-64.ld               |  68 +++++
 linux-user/ppc/vdso-64.so               | Bin 0 -> 3896 bytes
 linux-user/ppc/vdso-64le.so             | Bin 0 -> 3896 bytes
 linux-user/ppc/vdso.S                   | 239 +++++++++++++++
 linux-user/riscv/Makefile.vdso          |  11 +
 linux-user/riscv/meson.build            |   9 +
 linux-user/riscv/vdso-32.so             | Bin 0 -> 2652 bytes
 linux-user/riscv/vdso-64.so             | Bin 0 -> 3528 bytes
 linux-user/riscv/vdso.S                 | 186 ++++++++++++
 linux-user/riscv/vdso.ld                |  74 +++++
 linux-user/s390x/Makefile.vdso          |   5 +
 linux-user/s390x/meson.build            |   6 +
 linux-user/s390x/vdso.S                 |  61 ++++
 linux-user/s390x/vdso.ld                |  69 +++++
 linux-user/s390x/vdso.so                | Bin 0 -> 3464 bytes
 linux-user/x86_64/Makefile.vdso         |   5 +
 linux-user/x86_64/meson.build           |   6 +
 linux-user/x86_64/vdso.S                |  78 +++++
 linux-user/x86_64/vdso.ld               |  73 +++++
 linux-user/x86_64/vdso.so               | Bin 0 -> 2968 bytes
 73 files changed, 3259 insertions(+), 211 deletions(-)
 create mode 100644 linux-user/hppa/vdso-asmoffset.h
 create mode 100644 linux-user/i386/vdso-asmoffset.h
 create mode 100644 linux-user/loongarch64/vdso-asmoffset.h
 create mode 100644 linux-user/ppc/vdso-asmoffset.h
 create mode 100644 linux-user/riscv/vdso-asmoffset.h
 create mode 100644 linux-user/s390x/vdso-asmoffset.h
 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/loongarch64/Makefile.vdso
 create mode 100644 linux-user/loongarch64/meson.build
 create mode 100644 linux-user/loongarch64/vdso.S
 create mode 100644 linux-user/loongarch64/vdso.ld
 create mode 100755 linux-user/loongarch64/vdso.so
 create mode 100644 linux-user/ppc/Makefile.vdso
 create mode 100644 linux-user/ppc/vdso-32.ld
 create mode 100755 linux-user/ppc/vdso-32.so
 create mode 100644 linux-user/ppc/vdso-64.ld
 create mode 100755 linux-user/ppc/vdso-64.so
 create mode 100755 linux-user/ppc/vdso-64le.so
 create mode 100644 linux-user/ppc/vdso.S
 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/s390x/Makefile.vdso
 create mode 100644 linux-user/s390x/vdso.S
 create mode 100644 linux-user/s390x/vdso.ld
 create mode 100755 linux-user/s390x/vdso.so
 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