mbox series

[v6,00/19] linux-user: Implement VDSOs

Message ID 20230930021529.987950-1-richard.henderson@linaro.org (mailing list archive)
Headers show
Series linux-user: Implement VDSOs | expand

Message

Richard Henderson Sept. 30, 2023, 2:15 a.m. UTC
Becase b4 eats a binaries:
  https://gitlab.com/rth7680/qemu/-/tree/lu-vdso

Changes for v6:
  * Revert build-vdso.sh and meson rules.
  * Add update-linux-vdso makefile rule.  Since this is run manually,
    we no longer have a problem with docker images failing to update
    and causing the normal build to fail.

Changes for v5:
  * Integrated cross-compile, via new build-vdso.sh and meson rules.
    However, keep the binaries in the tree for hosts which do not
    have all of the cross-compile machinery.
  * Update our loongarch64 docker image to avoid a binutils bug.

r~


Richard Henderson (19):
  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
  build: Add update-linux-vdso makefile rule

 Makefile                                |  10 +
 linux-user/arm/vdso-asmoffset.h         |   3 +
 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                 |  55 ++--
 linux-user/elfload.c                    | 358 +++++++++++++++---------
 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        |  15 +
 linux-user/aarch64/meson.build          |  11 +
 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               |  71 +++++
 linux-user/aarch64/vdso.ld              |  72 +++++
 linux-user/arm/Makefile.vdso            |  17 ++
 linux-user/arm/meson.build              |  12 +
 linux-user/arm/vdso-be.so               | Bin 0 -> 2648 bytes
 linux-user/arm/vdso-le.so               | Bin 0 -> 2648 bytes
 linux-user/arm/vdso.S                   | 174 ++++++++++++
 linux-user/arm/vdso.ld                  |  67 +++++
 linux-user/hppa/Makefile.vdso           |  11 +
 linux-user/hppa/meson.build             |   5 +
 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           |  11 +
 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    |  11 +
 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            |  20 ++
 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          |  15 +
 linux-user/riscv/meson.build            |   7 +
 linux-user/riscv/vdso-32.so             | Bin 0 -> 2888 bytes
 linux-user/riscv/vdso-64.so             | Bin 0 -> 3840 bytes
 linux-user/riscv/vdso.S                 | 186 ++++++++++++
 linux-user/riscv/vdso.ld                |  74 +++++
 linux-user/s390x/Makefile.vdso          |  11 +
 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         |  11 +
 linux-user/x86_64/meson.build           |   4 +
 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, 3274 insertions(+), 214 deletions(-)
 create mode 100644 linux-user/arm/vdso-asmoffset.h
 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-be.so
 create mode 100755 linux-user/arm/vdso-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