public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Szabolcs Nagy <nsz@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] aarch64: Fix the extension header write in getcontext and swapcontext
Date: Fri, 28 Oct 2022 10:18:22 +0000 (GMT)	[thread overview]
Message-ID: <20221028101822.6D5AB385735C@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=09c6c6073c925235b385af1d8edf6bc853eeaf60

commit 09c6c6073c925235b385af1d8edf6bc853eeaf60
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date:   Fri Jul 29 08:00:06 2022 +0100

    aarch64: Fix the extension header write in getcontext and swapcontext
    
    The extension header is two 32bit words and in the last header both
    should be 0. There is plenty space in the __reserved area, but it's
    better not to write more than we mean to.

Diff:
---
 sysdeps/unix/sysv/linux/aarch64/getcontext.S  | 4 ++--
 sysdeps/unix/sysv/linux/aarch64/swapcontext.S | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/aarch64/getcontext.S b/sysdeps/unix/sysv/linux/aarch64/getcontext.S
index 15fbd2d1a0..3109cbd99a 100644
--- a/sysdeps/unix/sysv/linux/aarch64/getcontext.S
+++ b/sysdeps/unix/sysv/linux/aarch64/getcontext.S
@@ -86,8 +86,8 @@ ENTRY(__getcontext)
 	/* Write the termination context extension header.  */
 	add	x2, x2, #FPSIMD_CONTEXT_SIZE
 
-	str	xzr, [x2, #oHEAD + oMAGIC]
-	str	xzr, [x2, #oHEAD + oSIZE]
+	str	wzr, [x2, #oHEAD + oMAGIC]
+	str	wzr, [x2, #oHEAD + oSIZE]
 
 	/* Grab the signal mask */
 	/* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */
diff --git a/sysdeps/unix/sysv/linux/aarch64/swapcontext.S b/sysdeps/unix/sysv/linux/aarch64/swapcontext.S
index 1ee2e40272..e3ec9da35d 100644
--- a/sysdeps/unix/sysv/linux/aarch64/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/aarch64/swapcontext.S
@@ -75,8 +75,8 @@ ENTRY(__swapcontext)
 	/* Write the termination context extension header.  */
 	add	x2, x2, #FPSIMD_CONTEXT_SIZE
 
-	str	xzr, [x2, #oHEAD + oMAGIC]
-	str	xzr, [x2, #oHEAD + oSIZE]
+	str	wzr, [x2, #oHEAD + oMAGIC]
+	str	wzr, [x2, #oHEAD + oSIZE]
 
 	/* Preserve ucp.  */
 	mov	x21, x1

                 reply	other threads:[~2022-10-28 10:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221028101822.6D5AB385735C@sourceware.org \
    --to=nsz@sourceware.org \
    --cc=glibc-cvs@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: 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).