valgrind/SOURCES/valgrind-3.18.1-s390x-vdso.patch
2022-01-11 18:00:07 +00:00

29 lines
1.3 KiB
Diff

commit 99bf5dabf7865aaea7f2192373633e026c6fb16e
Author: Andreas Arnez <arnez@linux.ibm.com>
Date: Thu Dec 9 15:27:41 2021 +0100
Bug 444481 - Don't unmap the vDSO on s390x
Newer Linux kernels on s390x may use the vDSO as a "trampoline" for
syscall restart. This means that the vDSO is no longer optional, and
unmapping it may lead to a segmentation fault when a system call restart
is performed.
So far Valgrind has been unmapping the vDSO on s390x. Just don't do this
anymore.
diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c
index 7d02d5567..95508ad1e 100644
--- a/coregrind/m_initimg/initimg-linux.c
+++ b/coregrind/m_initimg/initimg-linux.c
@@ -892,7 +892,8 @@ Addr setup_client_stack( void* init_sp,
# if !defined(VGP_ppc32_linux) && !defined(VGP_ppc64be_linux) \
&& !defined(VGP_ppc64le_linux) \
&& !defined(VGP_mips32_linux) && !defined(VGP_mips64_linux) \
- && !defined(VGP_nanomips_linux)
+ && !defined(VGP_nanomips_linux) \
+ && !defined(VGP_s390x_linux)
case AT_SYSINFO_EHDR: {
/* Trash this, because we don't reproduce it */
const NSegment* ehdrseg = VG_(am_find_nsegment)((Addr)auxv->u.a_ptr);