From: "H.J. Lu" <hjl.tools@gmail.com>
To: libc-stable@sourceware.org
Cc: fweimer@redhat.com, adhemerval.zanella@linaro.org,
carlos@redhat.com, goldstein.w.n@gmail.com, skpgkp2@gmail.com
Subject: [Backport: v2 0/7] Update _dl_tlsdesc_dynamic to preserve caller-saved registers
Date: Tue, 2 Apr 2024 06:27:16 -0700 [thread overview]
Message-ID: <20240402132723.807729-1-hjl.tools@gmail.com> (raw)
Changes in v2:
1. Add tst-gnu2-tls2mod1 to test-internal-extras.
---
GNU2 TLS descriptor instruction sequences have implicit _dl_tlsdesc_dynamic
call and compilers assume that caller-saved registers are unchanged after
call. Update _dl_tlsdesc_dynamic to preserve caller-saved registers.
Adhemerval Zanella (3):
Ignore undefined symbols for -mtls-dialect=gnu2
arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ
31372)
elf: Enable TLS descriptor tests on aarch64
Andreas Schwab (1):
Add tst-gnu2-tls2mod1 to test-internal-extras
H.J. Lu (3):
x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers
x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers
x86-64: Allocate state buffer space for RDI, RSI and RBX
config.h.in | 3 +
configure | 25 ++-
configure.ac | 17 +-
elf/Makefile | 34 +++-
elf/tst-gnu2-tls2.c | 122 +++++++++++
elf/tst-gnu2-tls2.h | 40 ++++
elf/tst-gnu2-tls2mod0.c | 32 +++
elf/tst-gnu2-tls2mod1.c | 32 +++
elf/tst-gnu2-tls2mod2.c | 32 +++
sysdeps/aarch64/preconfigure | 1 +
sysdeps/arm/Makefile | 8 +-
sysdeps/arm/configure | 32 +++
sysdeps/arm/configure.ac | 15 ++
sysdeps/arm/dl-tlsdesc.S | 70 ++++++-
sysdeps/arm/tst-gnu2-tls2.h | 128 ++++++++++++
sysdeps/i386/dl-machine.h | 2 +-
sysdeps/i386/dl-tlsdesc-dynamic.h | 190 ++++++++++++++++++
sysdeps/i386/dl-tlsdesc.S | 115 +++++------
sysdeps/unix/sysv/linux/x86_64/Makefile | 27 +++
.../sysv/linux/x86_64/include/asm/prctl.h | 5 +
.../linux/x86_64/tst-gnu2-tls2-amx-mod0.c | 2 +
.../linux/x86_64/tst-gnu2-tls2-amx-mod1.c | 2 +
.../linux/x86_64/tst-gnu2-tls2-amx-mod2.c | 2 +
.../sysv/linux/x86_64/tst-gnu2-tls2-amx.c | 83 ++++++++
.../sysv/linux/x86_64/tst-gnu2-tls2-amx.h | 63 ++++++
sysdeps/x86/Makefile | 7 +-
sysdeps/x86/cpu-features-offsets.sym | 1 +
sysdeps/x86/cpu-features.c | 118 ++++++++++-
sysdeps/x86/dl-procinfo.c | 16 ++
sysdeps/{x86_64 => x86}/features-offsets.sym | 2 +
sysdeps/x86/include/cpu-features.h | 2 +
sysdeps/x86/sysdep.h | 78 ++++++-
sysdeps/x86/tst-gnu2-tls2.c | 20 ++
sysdeps/x86_64/Makefile | 4 +-
sysdeps/x86_64/configure | 28 +++
sysdeps/x86_64/configure.ac | 15 ++
sysdeps/x86_64/dl-machine.h | 19 +-
sysdeps/x86_64/dl-procinfo.c | 16 ++
sysdeps/x86_64/dl-tlsdesc-dynamic.h | 166 +++++++++++++++
sysdeps/x86_64/dl-tlsdesc.S | 108 +++-------
sysdeps/x86_64/dl-trampoline-save.h | 34 ++++
sysdeps/x86_64/dl-trampoline-state.h | 51 +++++
sysdeps/x86_64/dl-trampoline.S | 20 +-
sysdeps/x86_64/dl-trampoline.h | 34 +---
sysdeps/x86_64/tst-gnu2-tls2mod1.S | 87 ++++++++
45 files changed, 1644 insertions(+), 264 deletions(-)
create mode 100644 elf/tst-gnu2-tls2.c
create mode 100644 elf/tst-gnu2-tls2.h
create mode 100644 elf/tst-gnu2-tls2mod0.c
create mode 100644 elf/tst-gnu2-tls2mod1.c
create mode 100644 elf/tst-gnu2-tls2mod2.c
create mode 100644 sysdeps/arm/tst-gnu2-tls2.h
create mode 100644 sysdeps/i386/dl-tlsdesc-dynamic.h
create mode 100644 sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod0.c
create mode 100644 sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod1.c
create mode 100644 sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx-mod2.c
create mode 100644 sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.c
create mode 100644 sysdeps/unix/sysv/linux/x86_64/tst-gnu2-tls2-amx.h
rename sysdeps/{x86_64 => x86}/features-offsets.sym (89%)
create mode 100644 sysdeps/x86/tst-gnu2-tls2.c
create mode 100644 sysdeps/x86_64/dl-tlsdesc-dynamic.h
create mode 100644 sysdeps/x86_64/dl-trampoline-save.h
create mode 100644 sysdeps/x86_64/dl-trampoline-state.h
create mode 100644 sysdeps/x86_64/tst-gnu2-tls2mod1.S
--
2.44.0
next reply other threads:[~2024-04-02 13:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 13:27 H.J. Lu [this message]
2024-04-02 13:27 ` [Backport: v2 1/7] x86: " H.J. Lu
2024-04-02 13:27 ` [Backport: v2 2/7] x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers H.J. Lu
2024-04-02 13:27 ` [Backport: v2 3/7] x86-64: Allocate state buffer space for RDI, RSI and RBX H.J. Lu
2024-04-02 13:27 ` [Backport: v2 4/7] Ignore undefined symbols for -mtls-dialect=gnu2 H.J. Lu
2024-04-02 13:27 ` [Backport: v2 5/7] arm: Update _dl_tlsdesc_dynamic to preserve caller-saved registers (BZ 31372) H.J. Lu
2024-04-02 13:27 ` [Backport: v2 6/7] elf: Enable TLS descriptor tests on aarch64 H.J. Lu
2024-04-02 13:27 ` [Backport: v2 7/7] Add tst-gnu2-tls2mod1 to test-internal-extras H.J. Lu
2024-04-03 22:32 ` [Backport: v2 0/7] Update _dl_tlsdesc_dynamic to preserve caller-saved registers Sunil Pandey
2024-04-03 17:22 Arjun Shankar
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=20240402132723.807729-1-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=goldstein.w.n@gmail.com \
--cc=libc-stable@sourceware.org \
--cc=skpgkp2@gmail.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).