From f1bdbbead9c08b755a0d50617486be646f2895c3 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 11 Dec 2021 17:44:14 +0100 Subject: [PATCH] 3.18.1-7 -Add valgrind-3.18.1-s390x-vdso.patch --- valgrind-3.18.1-s390x-vdso.patch | 28 ++++++++++++++++++++++++++++ valgrind.spec | 9 ++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 valgrind-3.18.1-s390x-vdso.patch diff --git a/valgrind-3.18.1-s390x-vdso.patch b/valgrind-3.18.1-s390x-vdso.patch new file mode 100644 index 0000000..501fc56 --- /dev/null +++ b/valgrind-3.18.1-s390x-vdso.patch @@ -0,0 +1,28 @@ +commit 99bf5dabf7865aaea7f2192373633e026c6fb16e +Author: Andreas Arnez +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); diff --git a/valgrind.spec b/valgrind.spec index c5de217..204c8e2 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -3,7 +3,7 @@ Summary: Tool for finding memory management bugs in programs Name: %{?scl_prefix}valgrind Version: 3.18.1 -Release: 6%{?dist} +Release: 7%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -131,6 +131,9 @@ Patch18: valgrind-3.18.1-demangle-namespace.patch # KDE#405377 Handle new Linux kernel feature: Restartable Sequences ("rseq") Patch19: valgrind-3.18.1-rseq-enosys.patch +# KDE#444481 gdb_server test failures on s390x +Patch20: valgrind-3.18.1-s390x-vdso.patch + BuildRequires: make BuildRequires: glibc-devel @@ -282,6 +285,7 @@ Valgrind User Manual for details. %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 %build # LTO triggers undefined symbols in valgrind. Valgrind has a --enable-lto @@ -511,6 +515,9 @@ fi %endif %changelog +* Sat Dec 11 2021 Mark Wielaard - 3.18.1-7 +-Add valgrind-3.18.1-s390x-vdso.patch + * Fri Dec 10 2021 Mark Wielaard - 3.18.1-6 - Add valgrind-3.18.1-rseq-enosys.patch