Improved valgrind-3.13.0-arm64-hwcap.patch
This commit is contained in:
parent
3bb7255849
commit
216add6d69
@ -1,17 +1,79 @@
|
|||||||
|
commit 6bb6c8a65a341a67bd059ec6e1c805813eb17264
|
||||||
|
Author: Mark Wielaard <mark@klomp.org>
|
||||||
|
Date: Tue Jun 19 18:00:45 2018 +0200
|
||||||
|
|
||||||
|
Mask AT_HWCAPS on arm64 to those instructions VEX implements.
|
||||||
|
|
||||||
|
This patch makes sure that the process running under valgrind only sees
|
||||||
|
the AES, PMULL, SHA1, SHA2, CRC32, FP, and ASIMD features in auxv AT_HWCAPS.
|
||||||
|
|
||||||
|
https://bugs.kde.org/show_bug.cgi?id=381556
|
||||||
|
|
||||||
diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c
|
diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c
|
||||||
index 30e1f85..387beae 100644
|
index 30e1f85..61cc458 100644
|
||||||
--- a/coregrind/m_initimg/initimg-linux.c
|
--- a/coregrind/m_initimg/initimg-linux.c
|
||||||
+++ b/coregrind/m_initimg/initimg-linux.c
|
+++ b/coregrind/m_initimg/initimg-linux.c
|
||||||
@@ -703,6 +703,12 @@ Addr setup_client_stack( void* init_sp,
|
@@ -703,6 +703,19 @@ Addr setup_client_stack( void* init_sp,
|
||||||
(and anything above) are not supported by Valgrind. */
|
(and anything above) are not supported by Valgrind. */
|
||||||
auxv->u.a_val &= VKI_HWCAP_S390_TE - 1;
|
auxv->u.a_val &= VKI_HWCAP_S390_TE - 1;
|
||||||
}
|
}
|
||||||
+# elif defined(VGP_arm64_linux)
|
+# elif defined(VGP_arm64_linux)
|
||||||
+ {
|
+ {
|
||||||
+ /* Linux 4.11 started pupulating this for arm64, but we
|
+ /* Limit the AT_HWCAP to just those features we explicitly
|
||||||
+ currently don't support any. */
|
+ support in VEX. */
|
||||||
+ auxv->u.a_val = 0;
|
+#define ARM64_SUPPORTED_HWCAP (VKI_HWCAP_AES \
|
||||||
|
+ | VKI_HWCAP_PMULL \
|
||||||
|
+ | VKI_HWCAP_SHA1 \
|
||||||
|
+ | VKI_HWCAP_SHA2 \
|
||||||
|
+ | VKI_HWCAP_CRC32 \
|
||||||
|
+ | VKI_HWCAP_FP \
|
||||||
|
+ | VKI_HWCAP_ASIMD)
|
||||||
|
+ auxv->u.a_val &= ARM64_SUPPORTED_HWCAP;
|
||||||
+ }
|
+ }
|
||||||
# endif
|
# endif
|
||||||
break;
|
break;
|
||||||
# if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
|
# if defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux)
|
||||||
|
diff --git a/include/vki/vki-arm64-linux.h b/include/vki/vki-arm64-linux.h
|
||||||
|
index af6b435..54b0428 100644
|
||||||
|
--- a/include/vki/vki-arm64-linux.h
|
||||||
|
+++ b/include/vki/vki-arm64-linux.h
|
||||||
|
@@ -692,6 +692,39 @@ struct vki_shminfo64 {
|
||||||
|
#define VKI_TIOCSSERIAL 0x541F
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
+// From linux-4.17/include/uapi/asm-generic/ioctls.h
|
||||||
|
+//----------------------------------------------------------------------
|
||||||
|
+
|
||||||
|
+#define VKI_HWCAP_FP (1 << 0)
|
||||||
|
+#define VKI_HWCAP_ASIMD (1 << 1)
|
||||||
|
+#define VKI_HWCAP_EVTSTRM (1 << 2)
|
||||||
|
+#define VKI_HWCAP_AES (1 << 3)
|
||||||
|
+#define VKI_HWCAP_PMULL (1 << 4)
|
||||||
|
+#define VKI_HWCAP_SHA1 (1 << 5)
|
||||||
|
+#define VKI_HWCAP_SHA2 (1 << 6)
|
||||||
|
+#define VKI_HWCAP_CRC32 (1 << 7)
|
||||||
|
+#define VKI_HWCAP_ATOMICS (1 << 8)
|
||||||
|
+#define VKI_HWCAP_FPHP (1 << 9)
|
||||||
|
+#define VKI_HWCAP_ASIMDHP (1 << 10)
|
||||||
|
+#define VKI_HWCAP_CPUID (1 << 11)
|
||||||
|
+#define VKI_HWCAP_ASIMDRDM (1 << 12)
|
||||||
|
+#define VKI_HWCAP_JSCVT (1 << 13)
|
||||||
|
+#define VKI_HWCAP_FCMA (1 << 14)
|
||||||
|
+#define VKI_HWCAP_LRCPC (1 << 15)
|
||||||
|
+#define VKI_HWCAP_DCPOP (1 << 16)
|
||||||
|
+#define VKI_HWCAP_SHA3 (1 << 17)
|
||||||
|
+#define VKI_HWCAP_SM3 (1 << 18)
|
||||||
|
+#define VKI_HWCAP_SM4 (1 << 19)
|
||||||
|
+#define VKI_HWCAP_ASIMDDP (1 << 20)
|
||||||
|
+#define VKI_HWCAP_SHA512 (1 << 21)
|
||||||
|
+#define VKI_HWCAP_SVE (1 << 22)
|
||||||
|
+#define VKI_HWCAP_ASIMDFHM (1 << 23)
|
||||||
|
+#define VKI_HWCAP_DIT (1 << 24)
|
||||||
|
+#define VKI_HWCAP_USCAT (1 << 25)
|
||||||
|
+#define VKI_HWCAP_ILRCPC (1 << 26)
|
||||||
|
+#define VKI_HWCAP_FLAGM (1 << 27)
|
||||||
|
+
|
||||||
|
+//----------------------------------------------------------------------
|
||||||
|
// And that's it!
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Summary: Tool for finding memory management bugs in programs
|
Summary: Tool for finding memory management bugs in programs
|
||||||
Name: %{?scl_prefix}valgrind
|
Name: %{?scl_prefix}valgrind
|
||||||
Version: 3.13.0
|
Version: 3.13.0
|
||||||
Release: 18%{?dist}
|
Release: 19%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.valgrind.org/
|
URL: http://www.valgrind.org/
|
||||||
@ -546,6 +546,9 @@ echo ===============END TESTING===============
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 12 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-19
|
||||||
|
- Improved valgrind-3.13.0-arm64-hwcap.patch
|
||||||
|
|
||||||
* Thu Apr 12 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-18
|
* Thu Apr 12 2018 Mark Wielaard <mjw@fedoraproject.org> - 3.13.0-18
|
||||||
- Add valgrind-3.13.0-build-id-phdrs.patch (#1566639)
|
- Add valgrind-3.13.0-build-id-phdrs.patch (#1566639)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user