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