diff --git a/valgrind-3.11.0-no-rdrand.patch b/valgrind-3.11.0-no-rdrand.patch new file mode 100644 index 0000000..cb4a49c --- /dev/null +++ b/valgrind-3.11.0-no-rdrand.patch @@ -0,0 +1,26 @@ +commit 1ab61656f71e94ce12b68de87f1e28cf3dc0c18c +Author: mjw +Date: Thu Oct 1 12:31:19 2015 +0000 + + Don't advertise RDRAND in cpuid for Core-i7-4910-like avx2 machine. + + Bug#353370. In amd64g_dirtyhelper_CPUID_avx2 we set the RDRAND bit + but we don't implement support for RDRAND. Turn the bit off so programs + don't try to use RDRAND when running under valgrind. + + git-svn-id: svn://svn.valgrind.org/vex/trunk@3197 8f6e269a-dfd6-0310-a8e1-e2731360e62c + +diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c +index e77d753..ab53e15 100644 +--- a/VEX/priv/guest_amd64_helpers.c ++++ b/VEX/priv/guest_amd64_helpers.c +@@ -3101,7 +3101,8 @@ void amd64g_dirtyhelper_CPUID_avx2 ( VexGuestAMD64State* st ) + SET_ABCD(0x0000000d, 0x756e6547, 0x6c65746e, 0x49656e69); + break; + case 0x00000001: +- SET_ABCD(0x000306c3, 0x02100800, 0x7ffafbff, 0xbfebfbff); ++ /* Don't advertise RDRAND support, bit 30 in ECX. */ ++ SET_ABCD(0x000306c3, 0x02100800, 0x3ffafbff, 0xbfebfbff); + break; + case 0x00000002: + SET_ABCD(0x76036301, 0x00f0b6ff, 0x00000000, 0x00c10000); diff --git a/valgrind.spec b/valgrind.spec index 4d46db6..92e6de4 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.11.0 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 1 License: GPLv2+ URL: http://www.valgrind.org/ @@ -61,6 +61,9 @@ Patch4: valgrind-3.11.0-arm64-xattr.patch # KDE#353084 arm64 doesn't support sigpending system call. Patch5: valgrind-3.11.0-arm64-sigpending.patch +# KDE#353370 don't advertise RDRAND in cpuid for Core-i7-4910-like avx2 +Patch6: valgrind-3.11.0-no-rdrand.patch + %if %{build_multilib} # Ensure glibc{,-devel} is installed for both multilib arches BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so @@ -170,6 +173,7 @@ Valgrind User Manual for details. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build # We need to use the software collection compiler and binutils if available. @@ -345,6 +349,9 @@ echo ===============END TESTING=============== %endif %changelog +* Thu Oct 01 2015 Mark Wielaard - 3.11.0-2 +- Add valgrind-3.11.0-no-rdrand.patch + * Wed Sep 23 2015 Mark Wielaard - 3.11.0-1 - Upgrade to valgrind 3.11.0 final - Drop patches included upstream