summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Karcher <sourceware-bugzilla@mkarcher.dialup.fu-berlin.de>2024-02-17 22:47:58 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-07-21 20:19:44 +0200
commitb73506c911e72dc5dfb6c831ea2c29b06569681a (patch)
tree03450cac7c8e4bff0e919768991c64d628ca2664
parentlinux: Set internal DIR filepos as off64_t (BZ #23960, BZ #24050) (diff)
downloadglibc-gentoo/glibc-2.40-1.tar.gz
glibc-gentoo/glibc-2.40-1.tar.bz2
glibc-gentoo/glibc-2.40-1.zip
Mitigation for "clone on sparc might fail with -EFAULT for no valid reason"gentoo/glibc-2.40-1
Bug: https://www.mail-archive.com/debian-glibc@lists.debian.org/msg62592.html Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31394 See-also: https://lore.kernel.org/sparclinux/62f9be9d-a086-4134-9a9f-5df8822708af@mkarcher.dialup.fu-berlin.de/ Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> (cherry picked from commit fa441cd6be9a34d81306d41defeefaa2ac31d0b8)
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/clone.S3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/clone.S3
2 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
index 748d25fcfe..c9cf9bb055 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S
@@ -28,6 +28,9 @@
.text
ENTRY (__clone)
save %sp,-96,%sp
+ save %sp,-96,%sp
+ flushw
+ restore
cfi_def_cfa_register(%fp)
cfi_window_save
cfi_register(%o7, %i7)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S
index e5ff2cf1a0..370d51fda2 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S
@@ -32,6 +32,9 @@
ENTRY (__clone)
save %sp, -192, %sp
+ save %sp, -192, %sp
+ flushw
+ restore
cfi_def_cfa_register(%fp)
cfi_window_save
cfi_register(%o7, %i7)