public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/31372] _dl_tlsdesc_dynamic doesn't preserve all caller-saved registers Date: Wed, 03 Apr 2024 17:42:59 +0000 [thread overview] Message-ID: <bug-31372-131-aGuC1399fC@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-31372-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=31372 --- Comment #13 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The release/2.39/master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a364304718725a31ab141936322855c76c73e35e commit a364304718725a31ab141936322855c76c73e35e Author: H.J. Lu <hjl.tools@gmail.com> Date: Mon Feb 26 06:37:03 2024 -0800 x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers Compiler generates the following instruction sequence for GNU2 dynamic TLS access: leaq tls_var@TLSDESC(%rip), %rax call *tls_var@TLSCALL(%rax) or leal tls_var@TLSDESC(%ebx), %eax call *tls_var@TLSCALL(%eax) CALL instruction is transparent to compiler which assumes all registers, except for EFLAGS and RAX/EAX, are unchanged after CALL. When _dl_tlsdesc_dynamic is called, it calls __tls_get_addr on the slow path. __tls_get_addr is a normal function which doesn't preserve any caller-saved registers. _dl_tlsdesc_dynamic saved and restored integer caller-saved registers, but didn't preserve any other caller-saved registers. Add _dl_tlsdesc_dynamic IFUNC functions for FNSAVE, FXSAVE, XSAVE and XSAVEC to save and restore all caller-saved registers. This fixes BZ #31372. Add GLRO(dl_x86_64_runtime_resolve) with GLRO(dl_x86_tlsdesc_dynamic) to optimize elf_machine_runtime_setup. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com> (cherry picked from commit 0aac205a814a8511e98d02b91a8dc908f1c53cde) -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2024-04-03 17:43 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-11 23:04 [Bug dynamic-link/31372] New: _dl_tlsdesc_dynamic doesn't preserve vector registers hjl.tools at gmail dot com 2024-02-11 23:05 ` [Bug dynamic-link/31372] " hjl.tools at gmail dot com 2024-02-11 23:18 ` hjl.tools at gmail dot com 2024-02-12 6:59 ` fw at deneb dot enyo.de 2024-02-12 7:11 ` sam at gentoo dot org 2024-02-12 10:46 ` fweimer at redhat dot com 2024-02-12 13:10 ` hjl.tools at gmail dot com 2024-02-14 15:04 ` [Bug dynamic-link/31372] _dl_tlsdesc_dynamic doesn't preserve all caller-saved registers hjl.tools at gmail dot com 2024-02-14 21:09 ` ismail at i10z dot com 2024-02-15 12:13 ` hjl.tools at gmail dot com 2024-02-15 20:39 ` hjl.tools at gmail dot com 2024-02-15 20:40 ` sam at gentoo dot org 2024-02-15 20:44 ` hjl.tools at gmail dot com 2024-02-15 21:07 ` sam at gentoo dot org 2024-02-15 21:14 ` hjl.tools at gmail dot com 2024-02-28 17:05 ` cvs-commit at gcc dot gnu.org 2024-02-29 12:31 ` cvs-commit at gcc dot gnu.org 2024-03-20 15:37 ` fweimer at redhat dot com 2024-04-02 13:16 ` carlos at redhat dot com 2024-04-03 17:42 ` cvs-commit at gcc dot gnu.org [this message] 2024-04-03 17:43 ` cvs-commit at gcc dot gnu.org 2024-04-11 19:06 ` adhemerval.zanella at linaro dot org
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=bug-31372-131-aGuC1399fC@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.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: linkBe 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).