public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "carlos at redhat dot com" <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: Tue, 02 Apr 2024 13:16:36 +0000 [thread overview] Message-ID: <bug-31372-131-MOuycwirhS@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-31372-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=31372 Carlos O'Donell <carlos at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlos at redhat dot com --- Comment #12 from Carlos O'Donell <carlos at redhat dot com> --- These two other issues are needed and should be noted as needed: commit fd7ee2e6c5eb49e4a630a9978b4d668bff6354ee Author: Andreas Schwab <schwab@suse.de> Date: Tue Mar 19 13:49:50 2024 +0100 Add tst-gnu2-tls2mod1 to test-internal-extras That allows sysdeps/x86_64/tst-gnu2-tls2mod1.S to use internal headers. Fixes: 717ebfa85c ("x86-64: Allocate state buffer space for RDI, RSI and RBX") commit 717ebfa85c8240d32d0d19d86a484c31c55c9617 Author: H.J. Lu <hjl.tools@gmail.com> Date: Mon Mar 18 06:40:16 2024 -0700 x86-64: Allocate state buffer space for RDI, RSI and RBX _dl_tlsdesc_dynamic preserves RDI, RSI and RBX before realigning stack. After realigning stack, it saves RCX, RDX, R8, R9, R10 and R11. Define TLSDESC_CALL_REGISTER_SAVE_AREA to allocate space for RDI, RSI and RBX to avoid clobbering saved RDI, RSI and RBX values on stack by xsave to STATE_SAVE_OFFSET(%rsp). +==================+<- stack frame start aligned at 8 or 16 bytes | |<- RDI saved in the red zone | |<- RSI saved in the red zone | |<- RBX saved in the red zone | |<- paddings for stack realignment of 64 bytes |------------------|<- xsave buffer end aligned at 64 bytes | |<- | |<- | |<- |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp) | |<- 8-byte padding for 64-byte alignment | |<- 8-byte padding for 64-byte alignment | |<- R11 | |<- R10 | |<- R9 | |<- R8 | |<- RDX | |<- RCX +==================+<- RSP aligned at 64 bytes Define TLSDESC_CALL_REGISTER_SAVE_AREA, the total register save area size for all integer registers by adding 24 to STATE_SAVE_OFFSET since RDI, RSI and RBX are saved onto stack without adjusting stack pointer first, using the red-zone. This fixes BZ #31501. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com> -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2024-04-02 13:16 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 [this message] 2024-04-03 17:42 ` cvs-commit at gcc dot gnu.org 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-MOuycwirhS@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).