public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/arm/morello/main] aarch64: fix extension header write in getcontext and swapcontext
@ 2022-10-26 15:10 Szabolcs Nagy
0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2022-10-26 15:10 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e9ec6c08e294e607fcc782f194c47c60cde06d91
commit e9ec6c08e294e607fcc782f194c47c60cde06d91
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Fri Jul 29 08:00:06 2022 +0100
aarch64: fix 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [glibc/arm/morello/main] aarch64: fix extension header write in getcontext and swapcontext
@ 2022-08-05 19:29 Szabolcs Nagy
0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2022-08-05 19:29 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2f90599f895576e5b0d7d91155182dd77300a8c3
commit 2f90599f895576e5b0d7d91155182dd77300a8c3
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Fri Jul 29 08:00:06 2022 +0100
aarch64: fix 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-26 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 15:10 [glibc/arm/morello/main] aarch64: fix extension header write in getcontext and swapcontext Szabolcs Nagy
-- strict thread matches above, loose matches on Subject: below --
2022-08-05 19:29 Szabolcs Nagy
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).