From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, pbonzini@redhat.com, philmd@linaro.org
Subject: [PATCH v3 00/15] linux-user: Implement VDSOs
Date: Fri, 11 Aug 2023 09:50:37 -0700 [thread overview]
Message-ID: <20230811165052.161080-1-richard.henderson@linaro.org> (raw)
It's time for another round on implementing the VDSO for linux-user.
We are now seeing applications built that absolutely require it,
and have no fallback for the VDSO to be absent.
For instance,
https://gitlab.com/qemu-project/qemu/-/issues/1267
uses musl and will currently branch to NULL executing the mmap
syscall, because the __kernel_vsyscall symbol is not found.
This is just a rebase of v2 from 2021:
https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg01311.html
and does nothing to address the cross-compilation issues.
I am more hopful that cross-compilation can be solved now, due
to the work on Native Library Calls:
https://patchew.org/QEMU/20230808141739.3110740-1-fufuyqqqqqq@gmail.com/
But frankly, even with cross-compilation enabled there will be
hosts which do not have the cross-compilers and I believe we will
still have to check the binaries into the repository. As they are
all on the order of 5 to 6k, I really do not see this as a problem.
r~
PS: This patch set is now 13 years old:
https://lists.nongnu.org/archive/html/qemu-devel/2010-04/msg00187.html
https://lists.gnu.org/archive/html/qemu-devel/2013-07/msg04036.html
Let's see if we can get this resolved before it can vote.
Richard Henderson (15):
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/aarch64: Add vdso and use it for rt_sigreturn
target/arm: Add isar_feature_aa32_a32
linux-user/arm: Add vdso and use it for rt_sigreturn
linux-user/hppa: Add vdso and use it for rt_sigreturn
linux-user/i386: Add vdso and use it for sigreturn
linux-user/x86_64: Add vdso
linux-user/riscv: Add vdso and use it for sigreturn
linux-user/loader.h | 60 ++++-
target/arm/cpu.h | 5 +
linux-user/arm/signal.c | 30 ++-
linux-user/elfload.c | 365 ++++++++++++++++++++-----------
linux-user/flatload.c | 8 +-
linux-user/gen-vdso.c | 223 +++++++++++++++++++
linux-user/hppa/signal.c | 1 -
linux-user/linuxload.c | 137 ++++++++++--
target/arm/tcg/cpu32.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 | 181 +++++++++++++++
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
46 files changed, 2467 insertions(+), 189 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
--
2.34.1
next reply other threads:[~2023-08-11 16:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 16:50 Richard Henderson [this message]
2023-08-11 16:50 ` [PATCH v3 01/15] linux-user: Introduce imgsrc_read, imgsrc_read_alloc Richard Henderson
2023-08-11 16:50 ` [PATCH v3 02/15] linux-user: Tidy loader_exec Richard Henderson
2023-08-11 16:50 ` [PATCH v3 03/15] linux-user: Do not clobber bprm_buf swapping ehdr Richard Henderson
2023-08-11 16:50 ` [PATCH v3 04/15] linux-user: Use ImageSource in load_elf_image Richard Henderson
2023-08-11 16:50 ` [PATCH v3 05/15] linux-user: Use ImageSource in load_symbols Richard Henderson
2023-08-11 16:50 ` [PATCH v3 06/15] linux-user: Replace bprm->fd with bprm->src.fd Richard Henderson
2023-08-11 16:50 ` [PATCH v3 07/15] linux-user: Load vdso image if available Richard Henderson
2023-08-11 16:50 ` [PATCH v3 08/15] linux-user: Add gen-vdso tool Richard Henderson
2023-08-11 16:50 ` [PATCH v3 09/15] linux-user/aarch64: Add vdso and use it for rt_sigreturn Richard Henderson
2023-08-11 16:50 ` [PATCH v3 10/15] target/arm: Add isar_feature_aa32_a32 Richard Henderson
2023-08-11 16:50 ` [PATCH v3 11/15] linux-user/arm: Add vdso and use it for rt_sigreturn Richard Henderson
2023-08-11 16:50 ` [PATCH v3 12/15] linux-user/hppa: " Richard Henderson
2023-08-11 16:50 ` [PATCH v3 13/15] linux-user/i386: Add vdso and use it for sigreturn Richard Henderson
2023-08-11 16:50 ` [PATCH v3 14/15] linux-user/x86_64: Add vdso Richard Henderson
2023-08-11 16:50 ` [PATCH v3 15/15] linux-user/riscv: Add vdso and use it for sigreturn Richard Henderson
2023-08-14 9:52 ` [PATCH v3 00/15] linux-user: Implement VDSOs Alex Bennée
2023-08-16 18:06 ` 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=20230811165052.161080-1-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.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).