Compare commits
196 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a44e0e250a | ||
|
|
8c75266e08 | ||
|
|
8ecc39bb1a | ||
|
|
aee12d025e | ||
|
|
e0da26d095 | ||
|
|
c84b5d90fd | ||
|
|
bfbac831c1 | ||
|
|
108613b011 | ||
|
|
338731caea | ||
|
|
45259a9e71 | ||
|
|
fae4a52249 | ||
|
|
be14de47f6 | ||
|
|
76937a654e | ||
|
|
17943405ed | ||
|
|
6adf1117a3 | ||
|
|
7246749fd7 | ||
|
|
247872ecdc | ||
|
|
9fafb70210 | ||
|
|
821c1d5c3f | ||
|
|
5d0c2c856b | ||
|
|
6bfb3b55aa | ||
|
|
5aabba389f | ||
|
|
4a3e341785 | ||
|
|
f62b81aaa2 | ||
|
|
e9491d178b | ||
|
|
121dff8e1f | ||
|
|
f8e8a8e29d | ||
|
|
601fe6b14d | ||
|
|
ed1a9528e3 | ||
|
|
ebe46e89ad | ||
|
|
f6a6739c59 | ||
|
|
614cc2fa05 | ||
|
|
6da92b8ca6 | ||
|
|
75b1b9147c | ||
|
|
34c38e719f | ||
|
|
15d202a645 | ||
|
|
133f5f27a5 | ||
|
|
06fc321210 | ||
|
|
39592cc3ae | ||
|
|
1b1cdf6611 | ||
|
|
fbb97f2a3f | ||
|
|
8f2edbfc2a | ||
|
|
e2bd2af70c | ||
|
|
554fc90612 | ||
|
|
acc33b04c9 | ||
|
|
1cabfb854f | ||
|
|
489c705d3f | ||
|
|
5ef9ac5930 | ||
|
|
fedf3d4030 | ||
|
|
0e24fe58be | ||
|
|
fc6a1192e4 | ||
|
|
ebfe3bd913 | ||
|
|
70f76aaabf | ||
|
|
ae4f286130 | ||
|
|
9c3fb46e67 | ||
|
|
b86a6d3e9f | ||
|
|
b0b6accc12 | ||
|
|
4295b515b7 | ||
|
|
b62216ce3a | ||
|
|
3fdfb3c05f | ||
|
|
79f7a0b69f | ||
|
|
ebfba02e33 | ||
|
|
e5b933a454 | ||
|
|
35cf45d805 | ||
|
|
d20757b5fd | ||
|
|
d80baf58dc | ||
|
|
2cb3825159 | ||
|
|
ff531b85fd | ||
|
|
f4018eb5a6 | ||
|
|
446a440b29 | ||
|
|
f579fefc75 | ||
|
|
0bfc408a6b | ||
|
|
6f8aeb0d15 | ||
|
|
32e1d63ec3 | ||
|
|
7baa4ed285 | ||
|
|
7c6f24f04b | ||
|
|
32d01947a3 | ||
|
|
a69d34e287 | ||
|
|
e25ecae115 | ||
|
|
3ae60e7ef7 | ||
|
|
d8356c1fd8 | ||
|
|
a1bab0364c | ||
|
|
068f90a110 | ||
|
|
d38884287b | ||
|
|
abb597e9d8 | ||
|
|
c26fba590e | ||
|
|
acc558bbbe | ||
|
|
7ae6b1b7ad | ||
|
|
dafbb18244 | ||
|
|
17fcd94e04 | ||
|
|
089ce2c919 | ||
|
|
6cf39d342b | ||
|
|
e5cdcb45ad | ||
|
|
97e828edde | ||
|
|
24a691aa0a | ||
|
|
0378dd3a63 | ||
|
|
5fd4dd6339 | ||
|
|
e6b9f20ee0 | ||
|
|
79dc655a5c | ||
|
|
c397555264 | ||
|
|
2a6d55c5ff | ||
|
|
f1bdbbead9 | ||
|
|
ff4eb7f487 | ||
|
|
6a8a0b1986 | ||
|
|
b8d4e42b21 | ||
|
|
0e37cf264d | ||
|
|
b9b4facde8 | ||
|
|
e2e1c0b1bf | ||
|
|
f51111e602 | ||
|
|
54ca779d10 | ||
|
|
04e90e24c6 | ||
|
|
beb1f8730a | ||
|
|
a345f61510 | ||
|
|
cdb8886b44 | ||
|
|
1cb064e6af | ||
|
|
781a1f8449 | ||
|
|
f377310679 | ||
|
|
44edd21276 | ||
|
|
edae2b9128 | ||
|
|
c64eafb449 | ||
|
|
a8914b410d | ||
|
|
f24346e6a4 | ||
|
|
dcd463c59d | ||
|
|
9cfae7ad95 | ||
|
|
a368ab701a | ||
|
|
103a632efa | ||
|
|
f531747bcb | ||
|
|
925e930034 | ||
|
|
edbf1c26c3 | ||
|
|
543a722e08 | ||
|
|
cfaf74d97d | ||
|
|
b35e0b892c | ||
|
|
defd9797da | ||
|
|
024b8dbc5e | ||
|
|
632481ff8c | ||
|
|
4a13e5ce74 | ||
|
|
f5bf8faa66 | ||
|
|
39ef6a93f4 | ||
|
|
d0ee12fb3c | ||
|
|
5a53fca2ab | ||
|
|
3e84ebda23 | ||
|
|
9a0a8de052 | ||
|
|
dc7d3866cc | ||
|
|
e7800660e6 | ||
|
|
858fa472f5 | ||
|
|
75fe92cbdd | ||
|
|
5a023ad9be | ||
|
|
4dc277807e | ||
|
|
f0e9e494f7 | ||
|
|
24ec9a0480 | ||
|
|
f2c4fda651 | ||
|
|
92d5263b50 | ||
|
|
52876a98ed | ||
|
|
c043c49cd3 | ||
|
|
248f3f26ce | ||
|
|
b410fdab03 | ||
|
|
7faf5f9863 | ||
|
|
1aa3bbb396 | ||
|
|
3828df5e3f | ||
|
|
aa2330f490 | ||
|
|
800b3249fc | ||
|
|
694bfef4aa | ||
|
|
4d61a87974 | ||
|
|
511be3b3d2 | ||
|
|
45cbad6c99 | ||
|
|
d18b4e0348 | ||
|
|
7a148b9ea3 | ||
|
|
66d2557fe5 | ||
|
|
d4756990d7 | ||
|
|
099bdc8e64 | ||
|
|
14c0a54d5f | ||
|
|
c858e5c9f7 | ||
|
|
de7a086ef3 | ||
|
|
3e351e4f33 | ||
|
|
de58b8982b | ||
|
|
ee9019950a | ||
|
|
5b527d5d7b | ||
|
|
a37c73550f | ||
|
|
07435e8fef | ||
|
|
5071958c7d | ||
|
|
b34c10bac8 | ||
|
|
75a7dbe504 | ||
|
|
5aafd964b2 | ||
|
|
bf5c38fcec | ||
|
|
0d4d18b277 | ||
|
|
8befd4367e | ||
|
|
2731a32f07 | ||
|
|
df2573b831 | ||
|
|
0bfb6d5ba4 | ||
|
|
a5301888c2 | ||
|
|
2f27a7a930 | ||
|
|
65f97c3dea | ||
|
|
85d3012e02 | ||
|
|
94292abea9 | ||
|
|
f98cd63e1c | ||
|
|
28efd007fc |
37 changed files with 775 additions and 45446 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
31
.gitignore
vendored
31
.gitignore
vendored
|
|
@ -34,3 +34,34 @@
|
|||
/valgrind-3.15.0.RC1.tar.bz2
|
||||
/valgrind-3.15.0.RC2.tar.bz2
|
||||
/valgrind-3.15.0.tar.bz2
|
||||
/valgrind-3.16.0.GIT.tar.bz2
|
||||
/valgrind-3.16.0.RC2.tar.bz2
|
||||
/valgrind-3.16.0.tar.bz2
|
||||
/valgrind-3.16.1.tar.bz2
|
||||
/valgrind-3.17.0.RC1.tar.bz2
|
||||
/valgrind-3.17.0.RC2.tar.bz2
|
||||
/valgrind-3.17.0.tar.bz2
|
||||
/valgrind-3.18.0.RC1.tar.bz2
|
||||
/valgrind-3.18.1.tar.bz2
|
||||
/valgrind-3.19.0.tar.bz2
|
||||
/valgrind-3.20.0.tar.bz2
|
||||
/valgrind-3.21.0.RC1.tar.bz2
|
||||
/valgrind-3.21.0.RC2.tar.bz2
|
||||
/valgrind-3.21.0.tar.bz2
|
||||
/valgrind-3.22.0.RC1.tar.bz2
|
||||
/valgrind-3.22.0.RC2.tar.bz2
|
||||
/valgrind-3.22.0.tar.bz2
|
||||
/valgrind-3.23.0.RC1.tar.bz2
|
||||
/valgrind-3.23.0.RC2.tar.bz2
|
||||
/valgrind-3.23.0.tar.bz2
|
||||
/valgrind-3.24.0.tar.bz2
|
||||
/valgrind-3.25.0.RC1.tar.bz2
|
||||
/valgrind-3.25.0.RC2.tar.bz2
|
||||
/valgrind-3.25.0.tar.bz2
|
||||
/valgrind-3.25.1.tar.bz2
|
||||
/valgrind-3.26.0.RC1.tar.bz2
|
||||
/valgrind-3.26.0.tar.bz2
|
||||
/valgrind-3.27.0.RC1.tar.bz2
|
||||
/valgrind-3.27.0.RC2.tar.bz2
|
||||
/valgrind-3.27.0.tar.bz2
|
||||
/valgrind-3.27.1.tar.bz2
|
||||
|
|
|
|||
20
gating.yaml
Normal file
20
gating.yaml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
6
plans/ci.fmf
Normal file
6
plans/ci.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
summary: CI test plan, runs all tests from tests repo.
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/valgrind
|
||||
execute:
|
||||
how: tmt
|
||||
52
rpminspect.yaml
Normal file
52
rpminspect.yaml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
---
|
||||
inspections:
|
||||
# xml files shipped are GDB register set descriptions which can only be
|
||||
# verified with gdb/features/gdb-target.dtd, provided in GDB sources.
|
||||
xml: off
|
||||
|
||||
annocheck:
|
||||
# Currently lto is disabled globally for valgrind, it should be able
|
||||
# to be enabled through upstream configure --enable-lto in the future.
|
||||
# Note that all (default hardened) flags need to be repeated here, if
|
||||
# you override some config flags it will completely overwrite the
|
||||
# defaults (--ignore-unknown --verbose).
|
||||
jobs:
|
||||
- hardened: --ignore-unknown --verbose --skip-lto
|
||||
# Ignore files built specially without hardening flags
|
||||
ignore:
|
||||
# Valgrind tools themselves (memcheck, cachegrind, massif, etc) are
|
||||
# statically linked and need to be built without PIE to be loaded at
|
||||
# a fixed address in the program's address space.
|
||||
# Also need to be built without stack protection so the generated
|
||||
# code (valgrind VEX jit) interacts correctly with their own static code.
|
||||
- /usr/libexec/valgrind/*-*-linux
|
||||
# Wrappers for various string and mem functions such as memcpy, strlen, etc
|
||||
# that valgrind uses to keep track of memory usage. Hardening settings such
|
||||
# as optimizations need to be disabled so they don't interfere or break
|
||||
# the checks that valgrind does internally.
|
||||
- /usr/libexec/valgrind/vgpreload*so
|
||||
# libmpiwrap is special since it is a LD_PRELOAD wrapper used by valgrind
|
||||
# memcheck for MPI using programs, the wrapper is against a specific MPI
|
||||
# implementation though, in our case openmpi. We don't want to have a hard
|
||||
# dependency on openmpi however, so a user can use the wrapper without
|
||||
# explicitly pulling in openmpi unless the program explicitly uses it.
|
||||
- /usr/lib*/openmpi/valgrind/libmpiwrap-*-linux.so
|
||||
# These static archives (to create custom valgrind tools) are only
|
||||
# distributed in valgrind-tools-devel and don't have hardening flags
|
||||
# for the same reason as the standard tools (see above).
|
||||
- /usr/lib*/valgrind/*-*linux.a
|
||||
|
||||
debuginfo:
|
||||
ignore:
|
||||
# We add the debuginfo to vgpreload libraries because we want to show the
|
||||
# user exactly where the issue is, which we cannot without always having
|
||||
# the symtab around. The vgpreload libraries are really tiny, so it doesn't
|
||||
# have a big impact on the package size.
|
||||
- /usr/libexec/valgrind/vgpreload*.so
|
||||
|
||||
runpath:
|
||||
allowed_paths:
|
||||
# As described above, libmpiwrap is a wrapper against openmpi
|
||||
# so we set DT_RUNPATH to openmpi libs path
|
||||
- /usr/lib/openmpi/lib
|
||||
- /usr/lib64/openmpi/lib
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (valgrind-3.15.0.tar.bz2) = 5695d1355226fb63b0c80809ed43bb077b6eed4d427792d9d7ed944c38b557a84fe3c783517b921e32f161228e10e4625bea0550faa4685872bb4454450cfa7f
|
||||
SHA512 (valgrind-3.27.1.tar.bz2) = 4522e345fe31bc10478f21ab261cf7b3e509d80fe98fd0c7c9778ac9a9f90e1d8fa6e54a37c2e23114c01c95131035103fc1e78661710d7f45f5d564a31c1015
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
commit 9616e9bc9a1950f70ab1abd1c6ca9abc3f26eb7f
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Fri May 31 15:11:35 2019 +0200
|
||||
|
||||
Hook up membarrier syscall for arm-linux.
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
index 3c5194d55..5e8baf8db 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
@@ -1014,6 +1014,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINXY(__NR_getrandom, sys_getrandom), // 384
|
||||
LINXY(__NR_memfd_create, sys_memfd_create), // 385
|
||||
|
||||
+ LINX_(__NR_membarrier, sys_membarrier), // 389
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 391
|
||||
|
||||
LINXY(__NR_statx, sys_statx), // 397
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
commit 2d040ce2c7fd328b4e8b0c2363ebe0c2ea2cbc9f
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sat Jan 25 15:10:22 2020 +0100
|
||||
|
||||
arm: Hook up preadv2 and pwritev2 syscalls.
|
||||
|
||||
They work the same as on other linux architectures.
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
index 93ebc3f4d..18468f07e 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
@@ -1016,6 +1016,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 389
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 391
|
||||
+ LINXY(__NR_preadv2, sys_preadv2), // 392
|
||||
+ LINX_(__NR_pwritev2, sys_pwritev2), // 393
|
||||
|
||||
LINXY(__NR_statx, sys_statx), // 397
|
||||
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
commit 89423f5d8ba05a099c2c62227a00a4f4eec59eb3
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Tue May 7 21:20:04 2019 +0200
|
||||
|
||||
Intercept stpcpy also in ld.so for arm64
|
||||
|
||||
On other arches stpcpy () is intercepted for both libc.so and ld.so.
|
||||
But not on arm64, where it is only intercepted for libc.so.
|
||||
|
||||
This can cause memcheck warnings about the use of stpcpy () in ld.so
|
||||
when called through dlopen () because ld.so contains its own copy of
|
||||
that functions.
|
||||
|
||||
Fix by introducing VG_Z_LD_LINUX_AARCH64_SO_1 (the encoded name of
|
||||
ld.so on arm64) and using that in vg_replace_strmem.c to intercept
|
||||
stpcpy.
|
||||
|
||||
https://bugs.kde.org/show_bug.cgi?id=407307
|
||||
|
||||
diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h
|
||||
index c97941f..15ba67f 100644
|
||||
--- a/include/pub_tool_redir.h
|
||||
+++ b/include/pub_tool_redir.h
|
||||
@@ -313,7 +313,9 @@
|
||||
#define VG_Z_LD_SO_1 ldZdsoZd1 // ld.so.1
|
||||
#define VG_U_LD_SO_1 "ld.so.1"
|
||||
|
||||
+#define VG_Z_LD_LINUX_AARCH64_SO_1 ldZhlinuxZhaarch64ZdsoZd1
|
||||
#define VG_U_LD_LINUX_AARCH64_SO_1 "ld-linux-aarch64.so.1"
|
||||
+
|
||||
#define VG_U_LD_LINUX_ARMHF_SO_3 "ld-linux-armhf.so.3"
|
||||
|
||||
#endif
|
||||
diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c
|
||||
index 89a7dcc..19143cf 100644
|
||||
--- a/shared/vg_replace_strmem.c
|
||||
+++ b/shared/vg_replace_strmem.c
|
||||
@@ -1160,6 +1160,7 @@ static inline void my_exit ( int x )
|
||||
STPCPY(VG_Z_LIBC_SONAME, __stpcpy_sse2_unaligned)
|
||||
STPCPY(VG_Z_LD_LINUX_SO_2, stpcpy)
|
||||
STPCPY(VG_Z_LD_LINUX_X86_64_SO_2, stpcpy)
|
||||
+ STPCPY(VG_Z_LD_LINUX_AARCH64_SO_1,stpcpy)
|
||||
|
||||
#elif defined(VGO_darwin)
|
||||
//STPCPY(VG_Z_LIBC_SONAME, stpcpy)
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
commit 791fe5ecf909d573bcbf353b677b9404f9da0ed4
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Mon May 27 22:19:27 2019 +0200
|
||||
|
||||
Expose rdrand and f16c through cpuid also if the host only has avx.
|
||||
|
||||
The amd64 CPUID dirtyhelpers are mostly static since they emulate some
|
||||
existing CPU "family". The avx2 ("i7-4910MQ") CPUID variant however
|
||||
can "dynamicly" enable rdrand and/or f16c if the host supports them.
|
||||
Do the same for the avx_and_cx16 ("i5-2300") CPUID variant.
|
||||
|
||||
https://bugs.kde.org/show_bug.cgi?id=408009
|
||||
|
||||
diff --git a/VEX/priv/guest_amd64_defs.h b/VEX/priv/guest_amd64_defs.h
|
||||
index 4f34b41..a5de527 100644
|
||||
--- a/VEX/priv/guest_amd64_defs.h
|
||||
+++ b/VEX/priv/guest_amd64_defs.h
|
||||
@@ -165,7 +165,9 @@ extern void amd64g_dirtyhelper_storeF80le ( Addr/*addr*/, ULong/*data*/ );
|
||||
extern void amd64g_dirtyhelper_CPUID_baseline ( VexGuestAMD64State* st );
|
||||
extern void amd64g_dirtyhelper_CPUID_sse3_and_cx16 ( VexGuestAMD64State* st );
|
||||
extern void amd64g_dirtyhelper_CPUID_sse42_and_cx16 ( VexGuestAMD64State* st );
|
||||
-extern void amd64g_dirtyhelper_CPUID_avx_and_cx16 ( VexGuestAMD64State* st );
|
||||
+extern void amd64g_dirtyhelper_CPUID_avx_and_cx16 ( VexGuestAMD64State* st,
|
||||
+ ULong hasF16C,
|
||||
+ ULong hasRDRAND );
|
||||
extern void amd64g_dirtyhelper_CPUID_avx2 ( VexGuestAMD64State* st,
|
||||
ULong hasF16C, ULong hasRDRAND );
|
||||
|
||||
diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c
|
||||
index e4cf7e2..182bae0 100644
|
||||
--- a/VEX/priv/guest_amd64_helpers.c
|
||||
+++ b/VEX/priv/guest_amd64_helpers.c
|
||||
@@ -3141,8 +3141,11 @@ void amd64g_dirtyhelper_CPUID_sse42_and_cx16 ( VexGuestAMD64State* st )
|
||||
address sizes : 36 bits physical, 48 bits virtual
|
||||
power management:
|
||||
*/
|
||||
-void amd64g_dirtyhelper_CPUID_avx_and_cx16 ( VexGuestAMD64State* st )
|
||||
+void amd64g_dirtyhelper_CPUID_avx_and_cx16 ( VexGuestAMD64State* st,
|
||||
+ ULong hasF16C, ULong hasRDRAND )
|
||||
{
|
||||
+ vassert((hasF16C >> 1) == 0ULL);
|
||||
+ vassert((hasRDRAND >> 1) == 0ULL);
|
||||
# define SET_ABCD(_a,_b,_c,_d) \
|
||||
do { st->guest_RAX = (ULong)(_a); \
|
||||
st->guest_RBX = (ULong)(_b); \
|
||||
@@ -3157,9 +3160,14 @@ void amd64g_dirtyhelper_CPUID_avx_and_cx16 ( VexGuestAMD64State* st )
|
||||
case 0x00000000:
|
||||
SET_ABCD(0x0000000d, 0x756e6547, 0x6c65746e, 0x49656e69);
|
||||
break;
|
||||
- case 0x00000001:
|
||||
- SET_ABCD(0x000206a7, 0x00100800, 0x1f9ae3bf, 0xbfebfbff);
|
||||
+ case 0x00000001: {
|
||||
+ // As a baseline, advertise neither F16C (ecx:29) nor RDRAND (ecx:30),
|
||||
+ // but patch in support for them as directed by the caller.
|
||||
+ UInt ecx_extra
|
||||
+ = (hasF16C ? (1U << 29) : 0) | (hasRDRAND ? (1U << 30) : 0);
|
||||
+ SET_ABCD(0x000206a7, 0x00100800, (0x1f9ae3bf | ecx_extra), 0xbfebfbff);
|
||||
break;
|
||||
+ }
|
||||
case 0x00000002:
|
||||
SET_ABCD(0x76035a01, 0x00f0b0ff, 0x00000000, 0x00ca0000);
|
||||
break;
|
||||
diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c
|
||||
index 56e992c..96dee38 100644
|
||||
--- a/VEX/priv/guest_amd64_toIR.c
|
||||
+++ b/VEX/priv/guest_amd64_toIR.c
|
||||
@@ -22007,7 +22007,8 @@ Long dis_ESC_0F (
|
||||
|
||||
vassert(fName); vassert(fAddr);
|
||||
IRExpr** args = NULL;
|
||||
- if (fAddr == &amd64g_dirtyhelper_CPUID_avx2) {
|
||||
+ if (fAddr == &amd64g_dirtyhelper_CPUID_avx2
|
||||
+ || fAddr == &amd64g_dirtyhelper_CPUID_avx_and_cx16) {
|
||||
Bool hasF16C = (archinfo->hwcaps & VEX_HWCAPS_AMD64_F16C) != 0;
|
||||
Bool hasRDRAND = (archinfo->hwcaps & VEX_HWCAPS_AMD64_RDRAND) != 0;
|
||||
args = mkIRExprVec_3(IRExpr_GSPTR(),
|
||||
diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c
|
||||
index 3536e57..56a28d1 100644
|
||||
--- a/coregrind/m_machine.c
|
||||
+++ b/coregrind/m_machine.c
|
||||
@@ -1076,10 +1076,10 @@ Bool VG_(machine_get_hwcaps)( void )
|
||||
have_avx2 = (ebx & (1<<5)) != 0; /* True => have AVX2 */
|
||||
}
|
||||
|
||||
- /* Sanity check for RDRAND and F16C. These don't actually *need* AVX2, but
|
||||
- it's convenient to restrict them to the AVX2 case since the simulated
|
||||
- CPUID we'll offer them on has AVX2 as a base. */
|
||||
- if (!have_avx2) {
|
||||
+ /* Sanity check for RDRAND and F16C. These don't actually *need* AVX, but
|
||||
+ it's convenient to restrict them to the AVX case since the simulated
|
||||
+ CPUID we'll offer them on has AVX as a base. */
|
||||
+ if (!have_avx) {
|
||||
have_f16c = False;
|
||||
have_rdrand = False;
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,374 +0,0 @@
|
|||
commit 5f00db054a6f59502e9deeeb59ace2261207ee31
|
||||
Author: Alexandra Hajkova <ahajkova@redhat.com>
|
||||
Date: Thu May 2 08:24:02 2019 -0400
|
||||
|
||||
Add support for the copy_file_range syscall
|
||||
|
||||
Support amd64, x86, arm64, ppc64, ppc32 and s390x architectures.
|
||||
Also add sys-copy_file_range test case.
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d043ce3..3528925 100755
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4172,6 +4172,7 @@ AC_CHECK_FUNCS([ \
|
||||
utimensat \
|
||||
process_vm_readv \
|
||||
process_vm_writev \
|
||||
+ copy_file_range \
|
||||
])
|
||||
|
||||
# AC_CHECK_LIB adds any library found to the variable LIBS, and links these
|
||||
@@ -4187,6 +4188,8 @@ AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
|
||||
[test x$ac_cv_func_pthread_spin_lock = xyes])
|
||||
AM_CONDITIONAL([HAVE_PTHREAD_SETNAME_NP],
|
||||
[test x$ac_cv_func_pthread_setname_np = xyes])
|
||||
+AM_CONDITIONAL([HAVE_COPY_FILE_RANGE],
|
||||
+ [test x$ac_cv_func_copy_file_range = xyes])
|
||||
|
||||
if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \
|
||||
-o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX ; then
|
||||
diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
index f76191a..1edf9eb 100644
|
||||
--- a/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
+++ b/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
@@ -379,6 +379,7 @@ DECL_TEMPLATE(linux, sys_getsockname);
|
||||
DECL_TEMPLATE(linux, sys_getpeername);
|
||||
DECL_TEMPLATE(linux, sys_socketpair);
|
||||
DECL_TEMPLATE(linux, sys_kcmp);
|
||||
+DECL_TEMPLATE(linux, sys_copy_file_range);
|
||||
|
||||
// Some arch specific functions called from syswrap-linux.c
|
||||
extern Int do_syscall_clone_x86_linux ( Word (*fn)(void *),
|
||||
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
index 30e7d0e..0c1d8d1 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
@@ -863,6 +863,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINXY(__NR_statx, sys_statx), // 332
|
||||
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 324
|
||||
+
|
||||
+ LINX_(__NR_copy_file_range, sys_copy_file_range), // 326
|
||||
};
|
||||
|
||||
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
|
||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
index 290320a..f66be2d 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
@@ -819,7 +819,7 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
// (__NR_userfaultfd, sys_ni_syscall), // 282
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 283
|
||||
// (__NR_mlock2, sys_ni_syscall), // 284
|
||||
- // (__NR_copy_file_range, sys_ni_syscall), // 285
|
||||
+ LINX_(__NR_copy_file_range, sys_copy_file_range), // 285
|
||||
// (__NR_preadv2, sys_ni_syscall), // 286
|
||||
// (__NR_pwritev2, sys_ni_syscall), // 287
|
||||
// (__NR_pkey_mprotect, sys_ni_syscall), // 288
|
||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
||||
index 73ef98d..cd0ee74 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
||||
@@ -12093,6 +12093,36 @@ POST(sys_bpf)
|
||||
}
|
||||
}
|
||||
|
||||
+PRE(sys_copy_file_range)
|
||||
+{
|
||||
+ PRINT("sys_copy_file_range (%lu, %lu, %lu, %lu, %lu, %lu)", ARG1, ARG2, ARG3,
|
||||
+ ARG4, ARG5, ARG6);
|
||||
+
|
||||
+ PRE_REG_READ6(vki_size_t, "copy_file_range",
|
||||
+ int, "fd_in",
|
||||
+ vki_loff_t *, "off_in",
|
||||
+ int, "fd_out",
|
||||
+ vki_loff_t *, "off_out",
|
||||
+ vki_size_t, "len",
|
||||
+ unsigned int, "flags");
|
||||
+
|
||||
+ /* File descriptors are "specially" tracked by valgrind.
|
||||
+ valgrind itself uses some, so make sure someone didn't
|
||||
+ put in one of our own... */
|
||||
+ if (!ML_(fd_allowed)(ARG1, "copy_file_range(fd_in)", tid, False) ||
|
||||
+ !ML_(fd_allowed)(ARG3, "copy_file_range(fd_in)", tid, False)) {
|
||||
+ SET_STATUS_Failure( VKI_EBADF );
|
||||
+ } else {
|
||||
+ /* Now see if the offsets are defined. PRE_MEM_READ will
|
||||
+ double check it can dereference them. */
|
||||
+ if (ARG2 != 0)
|
||||
+ PRE_MEM_READ( "copy_file_range(off_in)", ARG2, sizeof(vki_loff_t));
|
||||
+ if (ARG4 != 0)
|
||||
+ PRE_MEM_READ( "copy_file_range(off_out)", ARG4, sizeof(vki_loff_t));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
#undef PRE
|
||||
#undef POST
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
||||
index f812f1f..71f208d 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c
|
||||
@@ -1021,6 +1021,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINXY(__NR_getrandom, sys_getrandom), // 359
|
||||
LINXY(__NR_memfd_create, sys_memfd_create), // 360
|
||||
|
||||
+ LINX_(__NR_copy_file_range, sys_copy_file_range), // 379
|
||||
+
|
||||
LINXY(__NR_statx, sys_statx), // 383
|
||||
};
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
index eada099..1a42c1f 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
@@ -1007,6 +1007,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 365
|
||||
|
||||
+ LINX_(__NR_copy_file_range, sys_copy_file_range), // 379
|
||||
+
|
||||
LINXY(__NR_statx, sys_statx), // 383
|
||||
};
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
|
||||
index ad78384..41ada8d 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
|
||||
@@ -854,6 +854,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINXY(__NR_recvmsg, sys_recvmsg), // 372
|
||||
LINX_(__NR_shutdown, sys_shutdown), // 373
|
||||
|
||||
+ LINX_(__NR_copy_file_range, sys_copy_file_range), // 375
|
||||
+
|
||||
LINXY(__NR_statx, sys_statx), // 379
|
||||
};
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
index f05619e..f8d97ea 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
@@ -1608,6 +1608,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 375
|
||||
|
||||
+ LINX_(__NR_copy_file_range, sys_copy_file_range), // 377
|
||||
+
|
||||
LINXY(__NR_statx, sys_statx), // 383
|
||||
|
||||
/* Explicitly not supported on i386 yet. */
|
||||
diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am
|
||||
index d7515d9..00e99a5 100644
|
||||
--- a/memcheck/tests/linux/Makefile.am
|
||||
+++ b/memcheck/tests/linux/Makefile.am
|
||||
@@ -20,6 +20,7 @@ EXTRA_DIST = \
|
||||
stack_switch.stderr.exp stack_switch.vgtest \
|
||||
syscalls-2007.vgtest syscalls-2007.stderr.exp \
|
||||
syslog-syscall.vgtest syslog-syscall.stderr.exp \
|
||||
+ sys-copy_file_range.vgtest sys-copy_file_range.stderr.exp \
|
||||
sys-openat.vgtest sys-openat.stderr.exp sys-openat.stdout.exp \
|
||||
sys-statx.vgtest sys-statx.stderr.exp \
|
||||
timerfd-syscall.vgtest timerfd-syscall.stderr.exp \
|
||||
@@ -49,6 +50,10 @@ if HAVE_AT_FDCWD
|
||||
check_PROGRAMS += sys-openat
|
||||
endif
|
||||
|
||||
+if HAVE_COPY_FILE_RANGE
|
||||
+ check_PROGRAMS += sys-copy_file_range
|
||||
+endif
|
||||
+
|
||||
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
|
||||
diff --git a/memcheck/tests/linux/sys-copy_file_range.c b/memcheck/tests/linux/sys-copy_file_range.c
|
||||
new file mode 100644
|
||||
index 0000000..83981c6
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-copy_file_range.c
|
||||
@@ -0,0 +1,67 @@
|
||||
+#define _GNU_SOURCE
|
||||
+#include <fcntl.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/syscall.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ int fd_in, fd_out;
|
||||
+ struct stat stat;
|
||||
+ loff_t len, ret;
|
||||
+
|
||||
+ fd_in = open("copy_file_range_source", O_CREAT | O_RDWR);
|
||||
+ if (fd_in == -1) {
|
||||
+ perror("open copy_file_range_source");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ if (write(fd_in, "foo bar\n", 8) != 8) {
|
||||
+ perror("writing to the copy_file_range_source");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+ lseek(fd_in, 0, SEEK_SET);
|
||||
+
|
||||
+ if (fstat(fd_in, &stat) == -1) {
|
||||
+ perror("fstat");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ len = stat.st_size;
|
||||
+
|
||||
+ fd_out = open("copy_file_range_dest", O_CREAT | O_WRONLY | O_TRUNC, 0644);
|
||||
+ if (fd_out == -1) {
|
||||
+ perror("open copy_file_range_dest");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ /* Check copy_file_range called with the correct arguments works. */
|
||||
+ do {
|
||||
+ ret = copy_file_range(fd_in, NULL, fd_out, NULL, len, 0);
|
||||
+ if (ret == -1) {
|
||||
+ perror("copy_file_range");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ len -= ret;
|
||||
+ } while (len > 0);
|
||||
+
|
||||
+ /* Check valgrind will produce expected warnings for the
|
||||
+ various wrong arguments. */
|
||||
+ do {
|
||||
+ void *t;
|
||||
+ void *z = (void *) -1;
|
||||
+
|
||||
+ ret = copy_file_range(fd_in, t, fd_out, NULL, len, 0);
|
||||
+ ret = copy_file_range(fd_in, NULL, fd_out, z, len, 0);
|
||||
+ ret = copy_file_range(- 1, NULL, - 1, NULL, len, 0);
|
||||
+ } while (0);
|
||||
+
|
||||
+ close(fd_in);
|
||||
+ close(fd_out);
|
||||
+ unlink("copy_file_range_source");
|
||||
+ unlink("copy_file_range_dest");
|
||||
+ exit(EXIT_SUCCESS);
|
||||
+}
|
||||
diff --git a/memcheck/tests/linux/sys-copy_file_range.stderr.exp b/memcheck/tests/linux/sys-copy_file_range.stderr.exp
|
||||
new file mode 100644
|
||||
index 0000000..1aa4dc2
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-copy_file_range.stderr.exp
|
||||
@@ -0,0 +1,21 @@
|
||||
+
|
||||
+Syscall param copy_file_range("off_in") contains uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-copy_file_range.c:57)
|
||||
+
|
||||
+Syscall param copy_file_range(off_out) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-copy_file_range.c:58)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Warning: invalid file descriptor -1 in syscall copy_file_range(fd_in)()
|
||||
+
|
||||
+HEAP SUMMARY:
|
||||
+ in use at exit: 0 bytes in 0 blocks
|
||||
+ total heap usage: 0 allocs, 0 frees, 0 bytes allocated
|
||||
+
|
||||
+For a detailed leak analysis, rerun with: --leak-check=full
|
||||
+
|
||||
+Use --track-origins=yes to see where uninitialised values come from
|
||||
+For lists of detected and suppressed errors, rerun with: -s
|
||||
+ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
|
||||
diff --git a/memcheck/tests/linux/sys-copy_file_range.vgtest b/memcheck/tests/linux/sys-copy_file_range.vgtest
|
||||
new file mode 100644
|
||||
index 0000000..b7741e8
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-copy_file_range.vgtest
|
||||
@@ -0,0 +1,2 @@
|
||||
+prereq: test -e sys-copy_file_range
|
||||
+prog: sys-copy_file_range
|
||||
commit bd27ad3ff31555484b7fdb310c4b033620882e44
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sun May 5 16:01:41 2019 +0200
|
||||
|
||||
Hook linux copy_file_range syscall on arm.
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-arm-linux.c b/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
index 9f1bdab..9ba0665 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-arm-linux.c
|
||||
@@ -1016,6 +1016,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINXY(__NR_getrandom, sys_getrandom), // 384
|
||||
LINXY(__NR_memfd_create, sys_memfd_create), // 385
|
||||
|
||||
+ LINX_(__NR_copy_file_range, sys_copy_file_range), // 391
|
||||
+
|
||||
LINXY(__NR_statx, sys_statx), // 397
|
||||
};
|
||||
|
||||
commit c212b72a63e43be323a4e028bbdbe8b023c22be8
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Wed May 15 21:30:00 2019 +0200
|
||||
|
||||
Explicitly make testcase variable for sys-copy_file_range undefined.
|
||||
|
||||
On some systems an extra warning could occur when a variable in
|
||||
the memcheck/tests/linux/sys-copy_file_range testcase was undefined,
|
||||
but (accidentially) pointed to known bad memory. Fix by defining the
|
||||
variable as 0, but then marking it explicitly undefined using memcheck
|
||||
VALGRIND_MAKE_MEM_UNDEFINED.
|
||||
|
||||
Followup for https://bugs.kde.org/show_bug.cgi?id=407218
|
||||
|
||||
diff --git a/memcheck/tests/linux/sys-copy_file_range.c b/memcheck/tests/linux/sys-copy_file_range.c
|
||||
index 83981c6..589399c 100644
|
||||
--- a/memcheck/tests/linux/sys-copy_file_range.c
|
||||
+++ b/memcheck/tests/linux/sys-copy_file_range.c
|
||||
@@ -3,8 +3,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
+#include "../../memcheck.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
|
||||
/* Check valgrind will produce expected warnings for the
|
||||
various wrong arguments. */
|
||||
do {
|
||||
- void *t;
|
||||
+ void *t = 0; VALGRIND_MAKE_MEM_UNDEFINED (&t, sizeof (void *));
|
||||
void *z = (void *) -1;
|
||||
|
||||
ret = copy_file_range(fd_in, t, fd_out, NULL, len, 0);
|
||||
commit 033d013bebeb3471c0da47060deb9a5771e6c913
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Fri May 24 21:51:31 2019 +0200
|
||||
|
||||
Fix memcheck/tests/linux/sys-copy_file_range open call (mode).
|
||||
|
||||
sys-copy_file_range.c calls open with O_CREAT flag and so must provide
|
||||
a mode argument. valgrind memcheck actually caught this ommission on
|
||||
some arches (fedora rawhide i686 specifically).
|
||||
|
||||
This is a small additional fixup for
|
||||
https://bugs.kde.org/show_bug.cgi?id=407218
|
||||
|
||||
diff --git a/memcheck/tests/linux/sys-copy_file_range.c b/memcheck/tests/linux/sys-copy_file_range.c
|
||||
index 589399c..3022fa1 100644
|
||||
--- a/memcheck/tests/linux/sys-copy_file_range.c
|
||||
+++ b/memcheck/tests/linux/sys-copy_file_range.c
|
||||
@@ -12,7 +12,7 @@ int main(int argc, char **argv)
|
||||
struct stat stat;
|
||||
loff_t len, ret;
|
||||
|
||||
- fd_in = open("copy_file_range_source", O_CREAT | O_RDWR);
|
||||
+ fd_in = open("copy_file_range_source", O_CREAT | O_RDWR, 0644);
|
||||
if (fd_in == -1) {
|
||||
perror("open copy_file_range_source");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
diff -ur valgrind-3.14.0.orig/VEX/priv/guest_s390_helpers.c valgrind-3.14.0/VEX/priv/guest_s390_helpers.c
|
||||
--- valgrind-3.14.0.orig/VEX/priv/guest_s390_helpers.c 2019-01-10 17:00:57.203206690 +0100
|
||||
+++ valgrind-3.14.0/VEX/priv/guest_s390_helpers.c 2019-01-10 17:06:23.335253900 +0100
|
||||
@@ -2469,7 +2469,7 @@
|
||||
/*--- Dirty helper for vector instructions ---*/
|
||||
/*------------------------------------------------------------*/
|
||||
|
||||
-#if defined(VGA_s390x)
|
||||
+#if defined(VGA_s390x) && 0 /* disable for old binutils */
|
||||
ULong
|
||||
s390x_dirtyhelper_vec_op(VexGuestS390XState *guest_state,
|
||||
const ULong serialized)
|
||||
diff -ur valgrind-3.14.0.orig/none/tests/s390x/Makefile.am valgrind-3.14.0/none/tests/s390x/Makefile.am
|
||||
--- valgrind-3.14.0.orig/none/tests/s390x/Makefile.am 2019-01-10 17:00:57.411202894 +0100
|
||||
+++ valgrind-3.14.0/none/tests/s390x/Makefile.am 2019-01-10 17:10:28.963776813 +0100
|
||||
@@ -18,8 +18,7 @@
|
||||
spechelper-cr spechelper-clr \
|
||||
spechelper-ltr spechelper-or \
|
||||
spechelper-icm-1 spechelper-icm-2 spechelper-tmll \
|
||||
- spechelper-tm laa vector lsc2 ppno vector_string vector_integer \
|
||||
- vector_float
|
||||
+ spechelper-tm laa
|
||||
|
||||
if BUILD_DFP_TESTS
|
||||
INSN_TESTS += dfp-1 dfp-2 dfp-3 dfp-4 dfptest dfpext dfpconv srnmt pfpo
|
||||
@@ -68,8 +67,3 @@
|
||||
fixbr_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
|
||||
fpext_CFLAGS = $(AM_CFLAGS) @FLAG_MLONG_DOUBLE_128@
|
||||
ex_clone_LDADD = -lpthread
|
||||
-vector_CFLAGS = $(AM_CFLAGS) -march=z13
|
||||
-lsc2_CFLAGS = -march=z13 -DS390_TESTS_NOCOLOR
|
||||
-vector_string_CFLAGS = $(AM_CFLAGS) -march=z13 -DS390_TEST_COUNT=5
|
||||
-vector_integer_CFLAGS = $(AM_CFLAGS) -march=z13 -DS390_TEST_COUNT=4
|
||||
-vector_float_CFLAGS = $(AM_CFLAGS) -march=z13 -DS390_TEST_COUNT=4
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
commit 59784c512ec40e588b21cf5ae8e31e9c4f99d6b8
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sat May 18 14:55:50 2019 +0200
|
||||
|
||||
aarch64 (arm64) isn't a supported architecture for exp-sgcheck.
|
||||
|
||||
exp-sgcheck/pc_main.c contains:
|
||||
|
||||
#if defined(VGA_arm) || defined(VGA_arm64)
|
||||
VG_(printf)("SGCheck doesn't work on ARM yet, sorry.\n");
|
||||
VG_(exit)(1);
|
||||
#endif
|
||||
|
||||
But exp-sgcheck/tests/is_arch_supported checked against uname -m
|
||||
which returns aarch64 (not arm64). Fix the test check so the
|
||||
exp-sgcheck tests are skipped instead of producing failures.
|
||||
|
||||
diff --git a/exp-sgcheck/tests/is_arch_supported b/exp-sgcheck/tests/is_arch_supported
|
||||
index 818cc61..d4c6191 100755
|
||||
--- a/exp-sgcheck/tests/is_arch_supported
|
||||
+++ b/exp-sgcheck/tests/is_arch_supported
|
||||
@@ -10,6 +10,6 @@
|
||||
# architectures.
|
||||
|
||||
case `uname -m` in
|
||||
- ppc*|arm*|s390x|mips*) exit 1;;
|
||||
+ ppc*|aarch64|arm*|s390x|mips*) exit 1;;
|
||||
*) exit 0;;
|
||||
esac
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
diff --git a/none/tests/x86/incdec_alt.c b/none/tests/x86/incdec_alt.c
|
||||
index 2db324275..b8ff5c07e 100644
|
||||
--- a/none/tests/x86/incdec_alt.c
|
||||
+++ b/none/tests/x86/incdec_alt.c
|
||||
@@ -8,6 +8,7 @@ int r1,r2,r3,r4,r5,r6,r7,r8,a1,a2;
|
||||
|
||||
extern void foo ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(foo) ":\n"
|
||||
"\tpushl $0\n"
|
||||
"\tpopfl\n"
|
||||
@@ -49,6 +50,7 @@ VG_SYM(foo) ":\n"
|
||||
"\tpopl " VG_SYM(r8) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
int main ( void )
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/VEX/priv/guest_s390_defs.h b/VEX/priv/guest_s390_defs.h
|
||||
index b9f038aaa..9f93cff19 100644
|
||||
--- a/VEX/priv/guest_s390_defs.h
|
||||
+++ b/VEX/priv/guest_s390_defs.h
|
||||
@@ -261,7 +261,7 @@ extern ULong last_execute_target;
|
||||
/* Vector operatons passed to s390x_dirtyhelper_vec_op(...) helper.
|
||||
Please don't change ordering of elements and append new items
|
||||
before S390_VEC_OP_LAST. */
|
||||
-enum {
|
||||
+typedef enum {
|
||||
S390_VEC_OP_INVALID = 0,
|
||||
S390_VEC_OP_VPKS = 1,
|
||||
S390_VEC_OP_VPKLS = 2,
|
||||
|
|
@ -1,644 +0,0 @@
|
|||
commit fe6805efc1b6db0cfa5f1cd5fb1854775cbfa31a
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sat Jan 25 18:34:58 2020 +0100
|
||||
|
||||
x86 and amd64 tests: Use .text and .previous around all top-level asm.
|
||||
|
||||
GCC10 defaults to -fno-common which exposes some latent bugs in
|
||||
some of the top-level asm code in various .c test files. Some of the
|
||||
tests started to segfault (even if not run under valgrind). Such code
|
||||
needs to be wrapped inside a .text and a .previous asm statement to
|
||||
make sure the code is generated in the .text code section and to
|
||||
make sure the compiler doesn't lose track of the section currently
|
||||
being used to generate data or code in. Without it code might be
|
||||
generated inside a data section or the other way around.
|
||||
|
||||
diff --git a/memcheck/tests/amd64/shr_edx.c b/memcheck/tests/amd64/shr_edx.c
|
||||
index f8746afff..bed289471 100644
|
||||
--- a/memcheck/tests/amd64/shr_edx.c
|
||||
+++ b/memcheck/tests/amd64/shr_edx.c
|
||||
@@ -8,6 +8,7 @@ ULong result;
|
||||
|
||||
extern void shrl32_with_0x10 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"shrl32_with_0x10:\n"
|
||||
"\tpushq %rdx\n"
|
||||
"\tmovq data, %rdx\n"
|
||||
@@ -20,6 +21,7 @@ asm("\n"
|
||||
"\tshrl32_with_0x10_jump:\n"
|
||||
"\tmov $0xdeaddead, %edx\n"
|
||||
"\tjmp shrl32_with_0x10_cont\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
diff --git a/none/tests/amd64/fxtract.c b/none/tests/amd64/fxtract.c
|
||||
index 4dff2a1f9..f4dfd36df 100644
|
||||
--- a/none/tests/amd64/fxtract.c
|
||||
+++ b/none/tests/amd64/fxtract.c
|
||||
@@ -6,6 +6,7 @@ double arg, res1, res2;
|
||||
|
||||
extern void do_fxtract ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
".global do_fxtract\n"
|
||||
"do_fxtract:\n"
|
||||
"\tfinit\n"
|
||||
@@ -13,7 +14,8 @@ asm("\n"
|
||||
"\tfxtract\n"
|
||||
"\tfstpl res1\n"
|
||||
"\tfstpl res2\n"
|
||||
-"\tret"
|
||||
+"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
void try ( double x )
|
||||
diff --git a/none/tests/amd64/jrcxz.c b/none/tests/amd64/jrcxz.c
|
||||
index dad088f08..4d70734c2 100644
|
||||
--- a/none/tests/amd64/jrcxz.c
|
||||
+++ b/none/tests/amd64/jrcxz.c
|
||||
@@ -8,6 +8,7 @@ ULong arg64, res64;
|
||||
|
||||
extern void foo64 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"foo64:\n"
|
||||
"\tpushq %rcx\n"
|
||||
|
||||
@@ -25,6 +26,7 @@ asm("\n"
|
||||
|
||||
"\tpopq %rcx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
@@ -32,6 +34,7 @@ UInt arg32, res32;
|
||||
|
||||
extern void foo32 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"foo32:\n"
|
||||
"\tpushq %rcx\n"
|
||||
|
||||
@@ -49,6 +52,7 @@ asm("\n"
|
||||
|
||||
"\tpopq %rcx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
diff --git a/none/tests/amd64/looper.c b/none/tests/amd64/looper.c
|
||||
index cb7f5cbea..586464242 100644
|
||||
--- a/none/tests/amd64/looper.c
|
||||
+++ b/none/tests/amd64/looper.c
|
||||
@@ -22,6 +22,7 @@ asm("\n"
|
||||
"\tmovq %rax, res\n"
|
||||
"\tpopq %rcx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void loop_ne ( void );
|
||||
@@ -42,6 +43,7 @@ asm("\n"
|
||||
"\tmovq %rax, res\n"
|
||||
"\tpopq %rcx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void loop_e ( void );
|
||||
@@ -66,6 +68,7 @@ asm("\n"
|
||||
"\tmovq %rax, res\n"
|
||||
"\tpopq %rcx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
int main ( void )
|
||||
diff --git a/none/tests/amd64/sbbmisc.c b/none/tests/amd64/sbbmisc.c
|
||||
index dd70efadc..1024bfd57 100644
|
||||
--- a/none/tests/amd64/sbbmisc.c
|
||||
+++ b/none/tests/amd64/sbbmisc.c
|
||||
@@ -9,6 +9,7 @@ int in_l, out_l1, out_l2;
|
||||
|
||||
extern void sbb_ib_al ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_ib_al) ":\n"
|
||||
|
||||
#ifndef VGP_amd64_darwin
|
||||
@@ -37,11 +38,13 @@ VG_SYM(sbb_ib_al) ":\n"
|
||||
#endif
|
||||
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void sbb_iw_ax ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_iw_ax) ":\n"
|
||||
|
||||
#ifndef VGP_amd64_darwin
|
||||
@@ -69,11 +72,13 @@ VG_SYM(sbb_iw_ax) ":\n"
|
||||
#endif
|
||||
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void sbb_il_eax ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_il_eax) ":\n"
|
||||
|
||||
#ifndef VGP_amd64_darwin
|
||||
@@ -101,11 +106,13 @@ VG_SYM(sbb_il_eax) ":\n"
|
||||
#endif
|
||||
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void sbb_eb_gb ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_eb_gb) ":\n"
|
||||
|
||||
#ifndef VGP_amd64_darwin
|
||||
@@ -135,11 +142,13 @@ VG_SYM(sbb_eb_gb) ":\n"
|
||||
#endif
|
||||
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void sbb_eb_gb_2 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_eb_gb_2) ":\n"
|
||||
"\tpushq %rcx\n"
|
||||
|
||||
@@ -173,11 +182,13 @@ VG_SYM(sbb_eb_gb_2) ":\n"
|
||||
|
||||
"\tpopq %rcx\n"
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void adc_eb_gb ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_eb_gb) ":\n"
|
||||
|
||||
#ifndef VGP_amd64_darwin
|
||||
@@ -207,11 +218,13 @@ VG_SYM(adc_eb_gb) ":\n"
|
||||
#endif
|
||||
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void adc_eb_gb_2 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_eb_gb_2) ":\n"
|
||||
"\tpushq %rcx\n"
|
||||
|
||||
@@ -245,10 +258,12 @@ VG_SYM(adc_eb_gb_2) ":\n"
|
||||
|
||||
"\tpopq %rcx\n"
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void adc_ib_al ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_ib_al) ":\n"
|
||||
|
||||
#ifndef VGP_amd64_darwin
|
||||
@@ -276,11 +291,13 @@ VG_SYM(adc_ib_al) ":\n"
|
||||
#endif
|
||||
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void adc_iw_ax ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_iw_ax) ":\n"
|
||||
|
||||
#ifndef VGP_amd64_darwin
|
||||
@@ -308,11 +325,13 @@ VG_SYM(adc_iw_ax) ":\n"
|
||||
#endif
|
||||
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void adc_il_eax ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_il_eax) ":\n"
|
||||
|
||||
#ifndef VGP_amd64_darwin
|
||||
@@ -340,6 +359,7 @@ VG_SYM(adc_il_eax) ":\n"
|
||||
#endif
|
||||
|
||||
"\tretq\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
diff --git a/none/tests/amd64/shrld.c b/none/tests/amd64/shrld.c
|
||||
index ca9d699e2..d77cfbdc9 100644
|
||||
--- a/none/tests/amd64/shrld.c
|
||||
+++ b/none/tests/amd64/shrld.c
|
||||
@@ -30,6 +30,7 @@ ULong flags_out;
|
||||
|
||||
extern void shld64 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"shld64:\n"
|
||||
"\tpushq %rsi\n"
|
||||
"\tpushq %r11\n"
|
||||
@@ -47,10 +48,12 @@ asm("\n"
|
||||
"\tpopq %r11\n"
|
||||
"\tpopq %rsi\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void shld32 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"shld32:\n"
|
||||
"\tpushq %rsi\n"
|
||||
"\tpushq %r11\n"
|
||||
@@ -68,10 +71,12 @@ asm("\n"
|
||||
"\tpopq %r11\n"
|
||||
"\tpopq %rsi\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void shld16 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"shld16:\n"
|
||||
"\tpushq %rsi\n"
|
||||
"\tpushq %r11\n"
|
||||
@@ -89,11 +94,13 @@ asm("\n"
|
||||
"\tpopq %r11\n"
|
||||
"\tpopq %rsi\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void shrd64 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"shrd64:\n"
|
||||
"\tpushq %rsi\n"
|
||||
"\tpushq %r11\n"
|
||||
@@ -111,10 +118,12 @@ asm("\n"
|
||||
"\tpopq %r11\n"
|
||||
"\tpopq %rsi\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void shrd32 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"shrd32:\n"
|
||||
"\tpushq %rsi\n"
|
||||
"\tpushq %r11\n"
|
||||
@@ -132,10 +141,12 @@ asm("\n"
|
||||
"\tpopq %r11\n"
|
||||
"\tpopq %rsi\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void shrd16 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"shrd16:\n"
|
||||
"\tpushq %rsi\n"
|
||||
"\tpushq %r11\n"
|
||||
@@ -153,6 +164,7 @@ asm("\n"
|
||||
"\tpopq %r11\n"
|
||||
"\tpopq %rsi\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
diff --git a/none/tests/amd64/slahf-amd64.c b/none/tests/amd64/slahf-amd64.c
|
||||
index 31857ecba..361b6791b 100644
|
||||
--- a/none/tests/amd64/slahf-amd64.c
|
||||
+++ b/none/tests/amd64/slahf-amd64.c
|
||||
@@ -5,6 +5,7 @@ typedef unsigned long long int ULong;
|
||||
|
||||
extern ULong lahf_1 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"lahf_1:\n"
|
||||
"\tpushq $0\n"
|
||||
"\tpopfq\n"
|
||||
@@ -13,10 +14,12 @@ asm("\n"
|
||||
"\tsubq %rax, %rdx\n"
|
||||
"\t.byte 0x9F\n" /* lahf */
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern ULong lahf_0 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"lahf_0:\n"
|
||||
"\tpushq $0\n"
|
||||
"\tpopfq\n"
|
||||
@@ -25,16 +28,19 @@ asm("\n"
|
||||
"\tsubq %rax, %rdx\n"
|
||||
"\t.byte 0x9F\n" /* lahf */
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern ULong sahf_then_lahf ( ULong );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
"sahf_then_lahf:\n"
|
||||
"\tmovq %rdi, %rax\n"
|
||||
"\t.byte 0x9E\n" /* sahf */
|
||||
"\tmovabsq $0, %rax\n"
|
||||
"\t.byte 0x9F\n" /* lahf */
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
int main ( void )
|
||||
diff --git a/none/tests/x86/cmpxchg8b.c b/none/tests/x86/cmpxchg8b.c
|
||||
index 3588840a8..9ca56afa6 100644
|
||||
--- a/none/tests/x86/cmpxchg8b.c
|
||||
+++ b/none/tests/x86/cmpxchg8b.c
|
||||
@@ -14,6 +14,7 @@ UInt zout;
|
||||
|
||||
extern void foo ( void );
|
||||
asm("\n"
|
||||
+ ".text\n"
|
||||
VG_SYM(foo) ":\n"
|
||||
"\tpushl %eax\n"
|
||||
"\tpushl %ebx\n"
|
||||
@@ -40,6 +41,7 @@ asm("\n"
|
||||
"\tpopl %ebx\n"
|
||||
"\tpopl %eax\n"
|
||||
"\tret\n"
|
||||
+ ".previous\n"
|
||||
);
|
||||
|
||||
int main ( void )
|
||||
diff --git a/none/tests/x86/fxtract.c b/none/tests/x86/fxtract.c
|
||||
index 235cda72c..f8c9bc41a 100644
|
||||
--- a/none/tests/x86/fxtract.c
|
||||
+++ b/none/tests/x86/fxtract.c
|
||||
@@ -6,13 +6,15 @@ double arg, res1, res2;
|
||||
|
||||
extern void do_fxtract ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(do_fxtract) ":\n"
|
||||
"\tfinit\n"
|
||||
"\tfldl " VG_SYM(arg) "\n"
|
||||
"\tfxtract\n"
|
||||
"\tfstpl " VG_SYM(res1) "\n"
|
||||
"\tfstpl " VG_SYM(res2) "\n"
|
||||
-"\tret"
|
||||
+"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
void try ( double x )
|
||||
diff --git a/none/tests/x86/lahf.c b/none/tests/x86/lahf.c
|
||||
index fc09352ac..a04c10da9 100644
|
||||
--- a/none/tests/x86/lahf.c
|
||||
+++ b/none/tests/x86/lahf.c
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
extern int foo_1 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(foo_1) ":\n"
|
||||
"\tpushl $0\n"
|
||||
"\tpopfl\n"
|
||||
@@ -11,10 +12,12 @@ VG_SYM(foo_1) ":\n"
|
||||
"\tsubl %eax, %edx\n"
|
||||
"\tlahf\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern int foo_0 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(foo_0) ":\n"
|
||||
"\tpushl $0\n"
|
||||
"\tpopfl\n"
|
||||
@@ -23,6 +26,7 @@ VG_SYM(foo_0) ":\n"
|
||||
"\tsubl %eax, %edx\n"
|
||||
"\tlahf\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
int main ( void )
|
||||
diff --git a/none/tests/x86/looper.c b/none/tests/x86/looper.c
|
||||
index 60554ec76..7f7ace8ad 100644
|
||||
--- a/none/tests/x86/looper.c
|
||||
+++ b/none/tests/x86/looper.c
|
||||
@@ -21,6 +21,7 @@ VG_SYM(loop_plain) ":\n"
|
||||
"\tmovl %eax, " VG_SYM(res) "\n"
|
||||
"\tpopl %ecx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void loop_ne ( void );
|
||||
@@ -40,6 +41,7 @@ VG_SYM(loop_ne) ":\n"
|
||||
"\tmovl %eax, " VG_SYM(res) "\n"
|
||||
"\tpopl %ecx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void loop_e ( void );
|
||||
@@ -63,6 +65,7 @@ VG_SYM(loop_e) ":\n"
|
||||
"\tmovl %eax, " VG_SYM(res) "\n"
|
||||
"\tpopl %ecx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
int main ( void )
|
||||
diff --git a/none/tests/x86/sbbmisc.c b/none/tests/x86/sbbmisc.c
|
||||
index 322d6e17d..7c4585d95 100644
|
||||
--- a/none/tests/x86/sbbmisc.c
|
||||
+++ b/none/tests/x86/sbbmisc.c
|
||||
@@ -9,6 +9,7 @@ int in_l, out_l1, out_l2;
|
||||
|
||||
extern void sbb_ib_al ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_ib_al) ":\n"
|
||||
|
||||
"\tmovb " VG_SYM(in_b) ", %al\n"
|
||||
@@ -22,11 +23,13 @@ VG_SYM(sbb_ib_al) ":\n"
|
||||
"\tmovb %al, " VG_SYM(out_b2) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void sbb_iw_ax ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_iw_ax) ":\n"
|
||||
|
||||
"\tmovw " VG_SYM(in_w) ", %ax\n"
|
||||
@@ -40,11 +43,13 @@ VG_SYM(sbb_iw_ax) ":\n"
|
||||
"\tmovw %ax, " VG_SYM(out_w2) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void sbb_il_eax ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_il_eax) ":\n"
|
||||
|
||||
"\tmovl " VG_SYM(in_l) ", %eax\n"
|
||||
@@ -58,11 +63,13 @@ VG_SYM(sbb_il_eax) ":\n"
|
||||
"\tmovl %eax, " VG_SYM(out_l2) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void sbb_eb_gb ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_eb_gb) ":\n"
|
||||
|
||||
"\tmovb " VG_SYM(in_b) ", %al\n"
|
||||
@@ -76,11 +83,13 @@ VG_SYM(sbb_eb_gb) ":\n"
|
||||
"\tmovb %al, " VG_SYM(out_b2) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void sbb_eb_gb_2 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(sbb_eb_gb_2) ":\n"
|
||||
"\tpushl %ecx\n"
|
||||
|
||||
@@ -98,11 +107,13 @@ VG_SYM(sbb_eb_gb_2) ":\n"
|
||||
|
||||
"\tpopl %ecx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void adc_eb_gb ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_eb_gb) ":\n"
|
||||
|
||||
"\tmovb " VG_SYM(in_b) ", %al\n"
|
||||
@@ -116,11 +127,13 @@ VG_SYM(adc_eb_gb) ":\n"
|
||||
"\tmovb %al, " VG_SYM(out_b2) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void adc_eb_gb_2 ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_eb_gb_2) ":\n"
|
||||
"\tpushl %ecx\n"
|
||||
|
||||
@@ -138,10 +151,12 @@ VG_SYM(adc_eb_gb_2) ":\n"
|
||||
|
||||
"\tpopl %ecx\n"
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
extern void adc_ib_al ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_ib_al) ":\n"
|
||||
|
||||
"\tmovb " VG_SYM(in_b) ", %al\n"
|
||||
@@ -155,11 +170,13 @@ VG_SYM(adc_ib_al) ":\n"
|
||||
"\tmovb %al, " VG_SYM(out_b2) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void adc_iw_ax ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_iw_ax) ":\n"
|
||||
|
||||
"\tmovw " VG_SYM(in_w) ", %ax\n"
|
||||
@@ -173,11 +190,13 @@ VG_SYM(adc_iw_ax) ":\n"
|
||||
"\tmovw %ax, " VG_SYM(out_w2) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
extern void adc_il_eax ( void );
|
||||
asm("\n"
|
||||
+".text\n"
|
||||
VG_SYM(adc_il_eax) ":\n"
|
||||
|
||||
"\tmovl " VG_SYM(in_l) ", %eax\n"
|
||||
@@ -191,6 +210,7 @@ VG_SYM(adc_il_eax) ":\n"
|
||||
"\tmovl %eax, " VG_SYM(out_l2) "\n"
|
||||
|
||||
"\tret\n"
|
||||
+".previous\n"
|
||||
);
|
||||
|
||||
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
diff --git a/none/tests/ppc64/test_isa_2_07_part1.c b/none/tests/ppc64/test_isa_2_07_part1.c
|
||||
index 187af3741..0efd39c1c 100644
|
||||
--- a/none/tests/ppc64/test_isa_2_07_part1.c
|
||||
+++ b/none/tests/ppc64/test_isa_2_07_part1.c
|
||||
@@ -384,27 +384,27 @@ static void test_fmrgow (void)
|
||||
// VSX move instructions
|
||||
static void test_mfvsrd (void)
|
||||
{
|
||||
- __asm__ __volatile__ ("mfvsrd %0,%x1" : "=r" (r14) : "ws" (vec_inA));
|
||||
+ __asm__ __volatile__ ("mfvsrd %0,%x1" : "=r" (r14) : "wa" (vec_inA));
|
||||
};
|
||||
|
||||
static void test_mfvsrwz (void)
|
||||
{
|
||||
- __asm__ __volatile__ ("mfvsrwz %0,%x1" : "=r" (r14) : "ws" (vec_inA));
|
||||
+ __asm__ __volatile__ ("mfvsrwz %0,%x1" : "=r" (r14) : "wa" (vec_inA));
|
||||
};
|
||||
|
||||
static void test_mtvsrd (void)
|
||||
{
|
||||
- __asm__ __volatile__ ("mtvsrd %x0,%1" : "=ws" (vec_out) : "r" (r14));
|
||||
+ __asm__ __volatile__ ("mtvsrd %x0,%1" : "=wa" (vec_out) : "r" (r14));
|
||||
};
|
||||
|
||||
static void test_mtvsrwz (void)
|
||||
{
|
||||
- __asm__ __volatile__ ("mtvsrwz %x0,%1" : "=ws" (vec_out) : "r" (r14));
|
||||
+ __asm__ __volatile__ ("mtvsrwz %x0,%1" : "=wa" (vec_out) : "r" (r14));
|
||||
};
|
||||
|
||||
static void test_mtvsrwa (void)
|
||||
{
|
||||
- __asm__ __volatile__ ("mtvsrwa %x0,%1" : "=ws" (vec_out) : "r" (r14));
|
||||
+ __asm__ __volatile__ ("mtvsrwa %x0,%1" : "=wa" (vec_out) : "r" (r14));
|
||||
};
|
||||
|
||||
static void test_mtfprwa (void)
|
||||
diff --git a/none/tests/ppc64/test_isa_3_0.c b/none/tests/ppc64/test_isa_3_0.c
|
||||
index 78b5130c1..cf9df8ac9 100644
|
||||
--- a/none/tests/ppc64/test_isa_3_0.c
|
||||
+++ b/none/tests/ppc64/test_isa_3_0.c
|
||||
@@ -1177,23 +1177,23 @@ static void test_xscmpexpdp(void) {
|
||||
}
|
||||
|
||||
static void test_xscmpeqdp(void) {
|
||||
- __asm__ __volatile__ ("xscmpeqdp %x0, %x1, %x2 " : "+wa" (vec_xt): "ww" (vec_xa), "ww" (vec_xb));
|
||||
+ __asm__ __volatile__ ("xscmpeqdp %x0, %x1, %x2 " : "+wa" (vec_xt): "wa" (vec_xa), "wa" (vec_xb));
|
||||
}
|
||||
|
||||
static void test_xscmpgtdp(void) {
|
||||
- __asm__ __volatile__ ("xscmpgtdp %x0, %x1, %x2 " : "+wa" (vec_xt): "ww" (vec_xa), "ww" (vec_xb));
|
||||
+ __asm__ __volatile__ ("xscmpgtdp %x0, %x1, %x2 " : "+wa" (vec_xt): "wa" (vec_xa), "wa" (vec_xb));
|
||||
}
|
||||
|
||||
static void test_xscmpgedp(void) {
|
||||
- __asm__ __volatile__ ("xscmpgedp %x0, %x1, %x2 " : "+wa" (vec_xt): "ww" (vec_xa), "ww" (vec_xb));
|
||||
+ __asm__ __volatile__ ("xscmpgedp %x0, %x1, %x2 " : "+wa" (vec_xt): "wa" (vec_xa), "wa" (vec_xb));
|
||||
}
|
||||
|
||||
static void test_xsmincdp(void) {
|
||||
- __asm__ __volatile__ ("xsmincdp %x0, %x1, %x2 " : "+wa" (vec_xt): "ww" (vec_xa), "ww" (vec_xb));
|
||||
+ __asm__ __volatile__ ("xsmincdp %x0, %x1, %x2 " : "+wa" (vec_xt): "wa" (vec_xa), "wa" (vec_xb));
|
||||
}
|
||||
|
||||
static void test_xsmaxcdp(void) {
|
||||
- __asm__ __volatile__ ("xsmaxcdp %x0, %x1, %x2 " : "+wa" (vec_xt): "ww" (vec_xa), "ww" (vec_xb));
|
||||
+ __asm__ __volatile__ ("xsmaxcdp %x0, %x1, %x2 " : "+wa" (vec_xt): "wa" (vec_xa), "wa" (vec_xb));
|
||||
}
|
||||
|
||||
static test_list_t testgroup_vector_scalar_compare_double[] = {
|
||||
@@ -1827,15 +1827,15 @@ static void test_xscvhpdp(void) {
|
||||
}
|
||||
|
||||
static void test_xscvdphp(void) {
|
||||
- __asm__ __volatile__ ("xscvdphp %x0, %x1 " : "+wi" (vec_xt) : "wi" (vec_xb));
|
||||
+ __asm__ __volatile__ ("xscvdphp %x0, %x1 " : "+wa" (vec_xt) : "wa" (vec_xb));
|
||||
}
|
||||
|
||||
static void test_xvcvhpsp(void) {
|
||||
- __asm__ __volatile__ ("xvcvhpsp %x0, %x1 " : "+ww" (vec_xt) : "ww" (vec_xb));
|
||||
+ __asm__ __volatile__ ("xvcvhpsp %x0, %x1 " : "+wa" (vec_xt) : "wa" (vec_xb));
|
||||
}
|
||||
|
||||
static void test_xvcvsphp(void) {
|
||||
- __asm__ __volatile__ ("xvcvsphp %x0, %x1 " : "+ww" (vec_xt) : "ww" (vec_xb));
|
||||
+ __asm__ __volatile__ ("xvcvsphp %x0, %x1 " : "+wa" (vec_xt) : "wa" (vec_xb));
|
||||
}
|
||||
|
||||
static test_list_t testgroup_vector_scalar_two_double[] = {
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
diff --git a/glibc-2.X.supp.in b/glibc-2.X.supp.in
|
||||
index 126e8b338..eeefa3935 100644
|
||||
--- a/glibc-2.X.supp.in
|
||||
+++ b/glibc-2.X.supp.in
|
||||
@@ -248,3 +248,37 @@
|
||||
Memcheck:Cond
|
||||
fun:_dl_runtime_resolve_avx_slow
|
||||
}
|
||||
+
|
||||
+# The main thread dynamic thread vector, DTV, which contains pointers
|
||||
+# to thread local variables, isn't freed. There are a couple of call
|
||||
+# patterns that can cause it to be extended.
|
||||
+{
|
||||
+ dtv-addr-tail
|
||||
+ Memcheck:Leak
|
||||
+ match-leak-kinds: possible,reachable
|
||||
+ fun:malloc
|
||||
+ fun:tls_get_addr_tail*
|
||||
+ fun:__tls_get_addr
|
||||
+}
|
||||
+
|
||||
+{
|
||||
+ dtv-addr-resize
|
||||
+ Memcheck:Leak
|
||||
+ match-leak-kinds: possible,reachable
|
||||
+ fun:malloc
|
||||
+ fun:_dl_resize_dtv
|
||||
+ fun:_dl_update_slotinfo
|
||||
+ fun:update_get_addr
|
||||
+ fun:__tls_get_addr
|
||||
+}
|
||||
+
|
||||
+{
|
||||
+ dtv-addr-init
|
||||
+ Memcheck:Leak
|
||||
+ match-leak-kinds: possible,reachable
|
||||
+ fun:malloc
|
||||
+ fun:allocate_dtv_entry
|
||||
+ fun:allocate_and_init
|
||||
+ fun:tls_get_addr_tail*
|
||||
+ fun:__tls_get_addr
|
||||
+}
|
||||
|
|
@ -1,226 +0,0 @@
|
|||
commit b064131bdf099d3647b4501e5d15391e1e9623e6
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Thu May 30 00:29:58 2019 +0200
|
||||
|
||||
linux x86 and amd64 memory protection key syscalls.
|
||||
|
||||
This implements minimal support for the pkey_alloc, pkey_free and
|
||||
pkey_mprotect syscalls. pkey_alloc will simply indicate that pkeys
|
||||
are not supported. pkey_free always fails. pkey_mprotect works just
|
||||
like mprotect if the special pkey -1 is provided.
|
||||
|
||||
https://bugs.kde.org/show_bug.cgi?id=408091
|
||||
|
||||
diff --git a/coregrind/m_syswrap/priv_syswrap-generic.h b/coregrind/m_syswrap/priv_syswrap-generic.h
|
||||
index 88530f0..3e1c8b6 100644
|
||||
--- a/coregrind/m_syswrap/priv_syswrap-generic.h
|
||||
+++ b/coregrind/m_syswrap/priv_syswrap-generic.h
|
||||
@@ -106,6 +106,10 @@ extern Bool
|
||||
ML_(handle_auxv_open)(SyscallStatus *status, const HChar *filename,
|
||||
int flags);
|
||||
|
||||
+/* Helper function for generic mprotect and linux pkey_mprotect. */
|
||||
+extern void handle_sys_mprotect (ThreadId tid, SyscallStatus *status,
|
||||
+ Addr *addr, SizeT *len, Int *prot);
|
||||
+
|
||||
DECL_TEMPLATE(generic, sys_ni_syscall); // * P -- unimplemented
|
||||
DECL_TEMPLATE(generic, sys_exit);
|
||||
DECL_TEMPLATE(generic, sys_fork);
|
||||
diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
index 5cf5407..2471524 100644
|
||||
--- a/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
+++ b/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
@@ -299,6 +299,11 @@ DECL_TEMPLATE(linux, sys_bpf);
|
||||
// Linux-specific (new in Linux 4.11)
|
||||
DECL_TEMPLATE(linux, sys_statx);
|
||||
|
||||
+// Linux-specific memory protection key syscalls (since Linux 4.9)
|
||||
+DECL_TEMPLATE(linux, sys_pkey_alloc);
|
||||
+DECL_TEMPLATE(linux, sys_pkey_free);
|
||||
+DECL_TEMPLATE(linux, sys_pkey_mprotect);
|
||||
+
|
||||
/* ---------------------------------------------------------------------
|
||||
Wrappers for sockets and ipc-ery. These are split into standalone
|
||||
procedures because x86-linux hides them inside multiplexors
|
||||
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
index d4fe413..2d6b95f 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
@@ -863,6 +863,10 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 324
|
||||
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 326
|
||||
+
|
||||
+ LINXY(__NR_pkey_mprotect, sys_pkey_mprotect), // 329
|
||||
+ LINX_(__NR_pkey_alloc, sys_pkey_alloc), // 330
|
||||
+ LINX_(__NR_pkey_free, sys_pkey_free), // 331
|
||||
};
|
||||
|
||||
SyscallTableEntry* ML_(get_linux_syscall_entry) ( UInt sysno )
|
||||
diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c
|
||||
index 0b64919..01191f6 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-generic.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-generic.c
|
||||
@@ -3842,12 +3842,28 @@ PRE(sys_mprotect)
|
||||
PRE_REG_READ3(long, "mprotect",
|
||||
unsigned long, addr, vki_size_t, len, unsigned long, prot);
|
||||
|
||||
- if (!ML_(valid_client_addr)(ARG1, ARG2, tid, "mprotect")) {
|
||||
+ Addr addr = ARG1;
|
||||
+ SizeT len = ARG2;
|
||||
+ Int prot = ARG3;
|
||||
+
|
||||
+ handle_sys_mprotect (tid, status, &addr, &len, &prot);
|
||||
+
|
||||
+ ARG1 = addr;
|
||||
+ ARG2 = len;
|
||||
+ ARG3 = prot;
|
||||
+}
|
||||
+/* This will be called from the generic mprotect, or the linux specific
|
||||
+ pkey_mprotect. Pass pointers to ARG1, ARG2 and ARG3 as addr, len and prot,
|
||||
+ they might be adjusted and have to assigned back to ARG1, ARG2 and ARG3. */
|
||||
+void handle_sys_mprotect(ThreadId tid, SyscallStatus* status,
|
||||
+ Addr *addr, SizeT *len, Int *prot)
|
||||
+{
|
||||
+ if (!ML_(valid_client_addr)(*addr, *len, tid, "mprotect")) {
|
||||
SET_STATUS_Failure( VKI_ENOMEM );
|
||||
}
|
||||
#if defined(VKI_PROT_GROWSDOWN)
|
||||
else
|
||||
- if (ARG3 & (VKI_PROT_GROWSDOWN|VKI_PROT_GROWSUP)) {
|
||||
+ if (*prot & (VKI_PROT_GROWSDOWN|VKI_PROT_GROWSUP)) {
|
||||
/* Deal with mprotects on growable stack areas.
|
||||
|
||||
The critical files to understand all this are mm/mprotect.c
|
||||
@@ -3862,8 +3878,8 @@ PRE(sys_mprotect)
|
||||
|
||||
The sanity check provided by the kernel is that the vma must
|
||||
have the VM_GROWSDOWN/VM_GROWSUP flag set as appropriate. */
|
||||
- UInt grows = ARG3 & (VKI_PROT_GROWSDOWN|VKI_PROT_GROWSUP);
|
||||
- NSegment const *aseg = VG_(am_find_nsegment)(ARG1);
|
||||
+ UInt grows = *prot & (VKI_PROT_GROWSDOWN|VKI_PROT_GROWSUP);
|
||||
+ NSegment const *aseg = VG_(am_find_nsegment)(*addr);
|
||||
NSegment const *rseg;
|
||||
|
||||
vg_assert(aseg);
|
||||
@@ -3874,10 +3890,10 @@ PRE(sys_mprotect)
|
||||
&& rseg->kind == SkResvn
|
||||
&& rseg->smode == SmUpper
|
||||
&& rseg->end+1 == aseg->start) {
|
||||
- Addr end = ARG1 + ARG2;
|
||||
- ARG1 = aseg->start;
|
||||
- ARG2 = end - aseg->start;
|
||||
- ARG3 &= ~VKI_PROT_GROWSDOWN;
|
||||
+ Addr end = *addr + *len;
|
||||
+ *addr = aseg->start;
|
||||
+ *len = end - aseg->start;
|
||||
+ *prot &= ~VKI_PROT_GROWSDOWN;
|
||||
} else {
|
||||
SET_STATUS_Failure( VKI_EINVAL );
|
||||
}
|
||||
@@ -3887,8 +3903,8 @@ PRE(sys_mprotect)
|
||||
&& rseg->kind == SkResvn
|
||||
&& rseg->smode == SmLower
|
||||
&& aseg->end+1 == rseg->start) {
|
||||
- ARG2 = aseg->end - ARG1 + 1;
|
||||
- ARG3 &= ~VKI_PROT_GROWSUP;
|
||||
+ *len = aseg->end - *addr + 1;
|
||||
+ *prot &= ~VKI_PROT_GROWSUP;
|
||||
} else {
|
||||
SET_STATUS_Failure( VKI_EINVAL );
|
||||
}
|
||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
||||
index 810ca24..5452b8d 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
||||
@@ -12120,6 +12120,76 @@ PRE(sys_copy_file_range)
|
||||
}
|
||||
}
|
||||
|
||||
+PRE(sys_pkey_alloc)
|
||||
+{
|
||||
+ PRINT("pkey_alloc (%lu, %lu)", ARG1, ARG2);
|
||||
+
|
||||
+ PRE_REG_READ2(long, "pkey_alloc",
|
||||
+ unsigned long, "flags",
|
||||
+ unsigned long, "access_rights");
|
||||
+
|
||||
+ /* The kernel says: pkey_alloc() is always safe to call regardless of
|
||||
+ whether or not the operating system supports protection keys. It can be
|
||||
+ used in lieu of any other mechanism for detecting pkey support and will
|
||||
+ simply fail with the error ENOSPC if the operating system has no pkey
|
||||
+ support.
|
||||
+
|
||||
+ So we simply always return ENOSPC to signal memory protection keys are
|
||||
+ not supported under valgrind, unless there are unknown flags, then we
|
||||
+ return EINVAL. */
|
||||
+ unsigned long pkey_flags = ARG1;
|
||||
+ if (pkey_flags != 0)
|
||||
+ SET_STATUS_Failure( VKI_EINVAL );
|
||||
+ else
|
||||
+ SET_STATUS_Failure( VKI_ENOSPC );
|
||||
+}
|
||||
+
|
||||
+PRE(sys_pkey_free)
|
||||
+{
|
||||
+ PRINT("pkey_free (%" FMT_REGWORD "u )", ARG1);
|
||||
+
|
||||
+ PRE_REG_READ1(long, "pkey_free",
|
||||
+ unsigned long, "pkey");
|
||||
+
|
||||
+ /* Since pkey_alloc () can never succeed, see above, freeing any pkey is
|
||||
+ always an error. */
|
||||
+ SET_STATUS_Failure( VKI_EINVAL );
|
||||
+}
|
||||
+
|
||||
+PRE(sys_pkey_mprotect)
|
||||
+{
|
||||
+ PRINT("sys_pkey_mprotect ( %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %"
|
||||
+ FMT_REGWORD "u %" FMT_REGWORD "u )", ARG1, ARG2, ARG3, ARG4);
|
||||
+ PRE_REG_READ4(long, "pkey_mprotect",
|
||||
+ unsigned long, addr, vki_size_t, len, unsigned long, prot,
|
||||
+ unsigned long, pkey);
|
||||
+
|
||||
+ Addr addr = ARG1;
|
||||
+ SizeT len = ARG2;
|
||||
+ Int prot = ARG3;
|
||||
+ Int pkey = ARG4;
|
||||
+
|
||||
+ /* Since pkey_alloc () can never succeed, see above, any pkey is
|
||||
+ invalid. Except for -1, then pkey_mprotect acts just like mprotect. */
|
||||
+ if (pkey != -1)
|
||||
+ SET_STATUS_Failure( VKI_EINVAL );
|
||||
+ else
|
||||
+ handle_sys_mprotect (tid, status, &addr, &len, &prot);
|
||||
+
|
||||
+ ARG1 = addr;
|
||||
+ ARG2 = len;
|
||||
+ ARG3 = prot;
|
||||
+}
|
||||
+
|
||||
+POST(sys_pkey_mprotect)
|
||||
+{
|
||||
+ Addr addr = ARG1;
|
||||
+ SizeT len = ARG2;
|
||||
+ Int prot = ARG3;
|
||||
+
|
||||
+ ML_(notify_core_and_tool_of_mprotect)(addr, len, prot);
|
||||
+}
|
||||
+
|
||||
|
||||
#undef PRE
|
||||
#undef POST
|
||||
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
index ad54cf6..3829fa4 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
@@ -1608,6 +1608,9 @@ static SyscallTableEntry syscall_table[] = {
|
||||
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 377
|
||||
|
||||
+ LINXY(__NR_pkey_mprotect, sys_pkey_mprotect), // 380
|
||||
+ LINX_(__NR_pkey_alloc, sys_pkey_alloc), // 381
|
||||
+ LINX_(__NR_pkey_free, sys_pkey_free), // 382
|
||||
LINXY(__NR_statx, sys_statx), // 383
|
||||
|
||||
/* Explicitly not supported on i386 yet. */
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
diff --git a/Makefile.all.am b/Makefile.all.am
|
||||
index 3786e34..1befef5 100644
|
||||
--- a/Makefile.all.am
|
||||
+++ b/Makefile.all.am
|
||||
@@ -50,20 +50,20 @@ inplace-noinst_DSYMS: build-noinst_DSYMS
|
||||
done
|
||||
|
||||
# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing
|
||||
-# "make install". It copies $(noinst_PROGRAMS) into $prefix/lib/valgrind/.
|
||||
+# "make install". It copies $(noinst_PROGRAMS) into $prefix/libexec/valgrind/.
|
||||
# It needs to be depended on by an 'install-exec-local' rule.
|
||||
install-noinst_PROGRAMS: $(noinst_PROGRAMS)
|
||||
- $(mkinstalldirs) $(DESTDIR)$(pkglibdir); \
|
||||
+ $(mkinstalldirs) $(DESTDIR)$(pkglibexecdir); \
|
||||
for f in $(noinst_PROGRAMS); do \
|
||||
- $(INSTALL_PROGRAM) $$f $(DESTDIR)$(pkglibdir); \
|
||||
+ $(INSTALL_PROGRAM) $$f $(DESTDIR)$(pkglibexecdir); \
|
||||
done
|
||||
|
||||
# This is used by coregrind/Makefile.am and by <tool>/Makefile.am for doing
|
||||
-# "make uninstall". It removes $(noinst_PROGRAMS) from $prefix/lib/valgrind/.
|
||||
+# "make uninstall". It removes $(noinst_PROGRAMS) from $prefix/libexec/valgrind/.
|
||||
# It needs to be depended on by an 'uninstall-local' rule.
|
||||
uninstall-noinst_PROGRAMS:
|
||||
for f in $(noinst_PROGRAMS); do \
|
||||
- rm -f $(DESTDIR)$(pkglibdir)/$$f; \
|
||||
+ rm -f $(DESTDIR)$(pkglibexecdir)/$$f; \
|
||||
done
|
||||
|
||||
# Similar to install-noinst_PROGRAMS.
|
||||
@@ -71,15 +71,15 @@ uninstall-noinst_PROGRAMS:
|
||||
# directories. XXX: not sure whether the resulting permissions will be
|
||||
# correct when using 'cp -R'...
|
||||
install-noinst_DSYMS: build-noinst_DSYMS
|
||||
- $(mkinstalldirs) $(DESTDIR)$(pkglibdir); \
|
||||
+ $(mkinstalldirs) $(DESTDIR)$(pkglibexecdir); \
|
||||
for f in $(noinst_DSYMS); do \
|
||||
- cp -R $$f.dSYM $(DESTDIR)$(pkglibdir); \
|
||||
+ cp -R $$f.dSYM $(DESTDIR)$(pkglibexecdir); \
|
||||
done
|
||||
|
||||
# Similar to uninstall-noinst_PROGRAMS.
|
||||
uninstall-noinst_DSYMS:
|
||||
for f in $(noinst_DSYMS); do \
|
||||
- rm -f $(DESTDIR)$(pkglibdir)/$$f.dSYM; \
|
||||
+ rm -f $(DESTDIR)$(pkglibexecdir)/$$f.dSYM; \
|
||||
done
|
||||
|
||||
# This needs to be depended on by a 'clean-local' rule.
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 242b38a..3b7c806 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -58,7 +58,7 @@ DEFAULT_SUPP_FILES = @DEFAULT_SUPP@
|
||||
# default.supp, as it is built from the base .supp files at compile-time.
|
||||
dist_noinst_DATA = $(SUPP_FILES)
|
||||
|
||||
-vglibdir = $(pkglibdir)
|
||||
+vglibdir = $(pkglibexecdir)
|
||||
vglib_DATA = default.supp
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
||||
index 94030fd..f09763a 100644
|
||||
--- a/coregrind/Makefile.am
|
||||
+++ b/coregrind/Makefile.am
|
||||
@@ -11,12 +11,12 @@ include $(top_srcdir)/Makefile.all.am
|
||||
|
||||
AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@ += \
|
||||
-I$(top_srcdir)/coregrind \
|
||||
- -DVG_LIBDIR="\"$(pkglibdir)"\" \
|
||||
+ -DVG_LIBDIR="\"$(pkglibexecdir)"\" \
|
||||
-DVG_PLATFORM="\"@VGCONF_ARCH_PRI@-@VGCONF_OS@\""
|
||||
if VGCONF_HAVE_PLATFORM_SEC
|
||||
AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@ += \
|
||||
-I$(top_srcdir)/coregrind \
|
||||
- -DVG_LIBDIR="\"$(pkglibdir)"\" \
|
||||
+ -DVG_LIBDIR="\"$(pkglibexecdir)"\" \
|
||||
-DVG_PLATFORM="\"@VGCONF_ARCH_SEC@-@VGCONF_OS@\""
|
||||
endif
|
||||
|
||||
@@ -714,7 +714,7 @@ GDBSERVER_XML_FILES = \
|
||||
m_gdbserver/mips64-fpu.xml
|
||||
|
||||
# so as to make sure these get copied into the install tree
|
||||
-vglibdir = $(pkglibdir)
|
||||
+vglibdir = $(pkglibexecdir)
|
||||
vglib_DATA = $(GDBSERVER_XML_FILES)
|
||||
|
||||
# so as to make sure these get copied into the tarball
|
||||
diff --git a/mpi/Makefile.am b/mpi/Makefile.am
|
||||
index 7ad9a25..471fee0 100644
|
||||
--- a/mpi/Makefile.am
|
||||
+++ b/mpi/Makefile.am
|
||||
@@ -18,16 +18,18 @@ EXTRA_DIST = \
|
||||
# libmpiwrap-<platform>.so
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
-noinst_PROGRAMS =
|
||||
+# These are really real libraries, so they should go to libdir, not libexec.
|
||||
+mpidir = $(pkglibdir)
|
||||
+mpi_PROGRAMS =
|
||||
if BUILD_MPIWRAP_PRI
|
||||
-noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
|
||||
+mpi_PROGRAMS += libmpiwrap-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
|
||||
endif
|
||||
if BUILD_MPIWRAP_SEC
|
||||
-noinst_PROGRAMS += libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
|
||||
+mpi_PROGRAMS += libmpiwrap-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
|
||||
endif
|
||||
|
||||
if VGCONF_OS_IS_DARWIN
|
||||
-noinst_DSYMS = $(noinst_PROGRAMS)
|
||||
+mpi_DSYMS = $(mpi_PROGRAMS)
|
||||
endif
|
||||
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
commit b1cc37ddb660afc536131227a9fb452ac9328972
|
||||
Author: Alexandra Hájková <ahajkova@redhat.com>
|
||||
Date: Mon Apr 15 15:34:12 2019 +0200
|
||||
|
||||
filter_gdb: add regexp to filter out names which starts with a "."
|
||||
|
||||
such names are used for "function descriptors" on ppc64
|
||||
|
||||
https://bugs.kde.org/show_bug.cgi?id=406561
|
||||
|
||||
diff --git a/gdbserver_tests/filter_gdb b/gdbserver_tests/filter_gdb
|
||||
index 6eff229..fd2e8e7 100755
|
||||
--- a/gdbserver_tests/filter_gdb
|
||||
+++ b/gdbserver_tests/filter_gdb
|
||||
@@ -119,6 +119,7 @@ sed -e '/Remote debugging using/,/vgdb launched process attached/d'
|
||||
-e 's/in select ()$/in syscall .../' \
|
||||
-e 's/in \.__select ()$/in syscall .../' \
|
||||
-e 's/in select () at \.\.\/sysdeps\/unix\/syscall-template\.S.*$/in syscall .../' \
|
||||
+ -e 's/in \.__select () at \.\.\/sysdeps\/unix\/syscall-template\.S.*$/in syscall .../' \
|
||||
-e '/^[ ]*at \.\.\/sysdeps\/unix\/syscall-template\.S/d' \
|
||||
-e '/^[ ]*in \.\.\/sysdeps\/unix\/syscall-template\.S/d' \
|
||||
-e '/^[1-9][0-9]*[ ]*\.\.\/sysdeps\/unix\/syscall-template\.S/d' \
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
coregrind/m_sigframe/sigframe-ppc64-linux.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/coregrind/m_sigframe/sigframe-ppc64-linux.c b/coregrind/m_sigframe/
|
||||
sigframe-ppc64-linux.c
|
||||
index 0406f3c..b54c4e0 100644
|
||||
--- a/coregrind/m_sigframe/sigframe-ppc64-linux.c
|
||||
+++ b/coregrind/m_sigframe/sigframe-ppc64-linux.c
|
||||
@@ -112,7 +112,7 @@ struct rt_sigframe {
|
||||
vki_siginfo_t info;
|
||||
struct vg_sig_private priv;
|
||||
UChar abigap[288]; // unused
|
||||
-};
|
||||
+} __attribute__ ((aligned (16)));
|
||||
|
||||
#define SET_SIGNAL_LR(zztst, zzval) \
|
||||
do { tst->arch.vex.guest_LR = (zzval); \
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,751 +0,0 @@
|
|||
commit b0861063a8d2a55bb7423e90d26806bab0f78a12
|
||||
Author: Alexandra Hájková <ahajkova@redhat.com>
|
||||
Date: Tue Jun 4 13:47:14 2019 +0200
|
||||
|
||||
Add support for preadv2 and pwritev2 syscalls
|
||||
|
||||
Support for amd64, x86 - 64 and 32 bit, arm64, ppc64, ppc64le,
|
||||
s390x, mips64. This should work identically on all
|
||||
arches, tested on x86 32bit and 64bit one, but enabled on all.
|
||||
|
||||
Refactor the code to be reusable between old/new syscalls. Resolve TODO
|
||||
items in the code. Add the testcase for the preadv2/pwritev2 and also
|
||||
add the (similar) testcase for the older preadv/pwritev syscalls.
|
||||
|
||||
Trying to test handling an uninitialized flag argument for the v2 syscalls
|
||||
does not work because the flag always comes out as defined zero.
|
||||
Turns out glibc does this deliberately on 64bit architectures because
|
||||
the kernel does actually have a low_offset and high_offset argument, but
|
||||
ignores the high_offset/assumes it is zero.
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=601cc11d054ae4b5e9b5babec3d8e4667a2cb9b5
|
||||
|
||||
https://bugs.kde.org/408414
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 352892565..3596d2fec 100755
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4173,6 +4173,10 @@ AC_CHECK_FUNCS([ \
|
||||
process_vm_readv \
|
||||
process_vm_writev \
|
||||
copy_file_range \
|
||||
+ preadv \
|
||||
+ pwritev \
|
||||
+ preadv2 \
|
||||
+ pwritev2 \
|
||||
])
|
||||
|
||||
# AC_CHECK_LIB adds any library found to the variable LIBS, and links these
|
||||
@@ -4190,6 +4194,10 @@ AM_CONDITIONAL([HAVE_PTHREAD_SETNAME_NP],
|
||||
[test x$ac_cv_func_pthread_setname_np = xyes])
|
||||
AM_CONDITIONAL([HAVE_COPY_FILE_RANGE],
|
||||
[test x$ac_cv_func_copy_file_range = xyes])
|
||||
+AM_CONDITIONAL([HAVE_PREADV_PWRITEV],
|
||||
+ [test x$ac_cv_func_preadv = xyes && test x$ac_cv_func_pwritev = xyes])
|
||||
+AM_CONDITIONAL([HAVE_PREADV2_PWRITEV2],
|
||||
+ [test x$ac_cv_func_preadv2 = xyes && test x$ac_cv_func_pwritev2 = xyes])
|
||||
|
||||
if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \
|
||||
-o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX ; then
|
||||
diff --git a/coregrind/m_syswrap/priv_syswrap-generic.h b/coregrind/m_syswrap/priv_syswrap-generic.h
|
||||
index 3e1c8b682..73f9224f7 100644
|
||||
--- a/coregrind/m_syswrap/priv_syswrap-generic.h
|
||||
+++ b/coregrind/m_syswrap/priv_syswrap-generic.h
|
||||
@@ -109,6 +109,19 @@ ML_(handle_auxv_open)(SyscallStatus *status, const HChar *filename,
|
||||
/* Helper function for generic mprotect and linux pkey_mprotect. */
|
||||
extern void handle_sys_mprotect (ThreadId tid, SyscallStatus *status,
|
||||
Addr *addr, SizeT *len, Int *prot);
|
||||
+/* Helper functions for preadv/preadv2. */
|
||||
+extern
|
||||
+void handle_pre_sys_preadv(ThreadId tid, SyscallStatus* status,
|
||||
+ Int fd, Addr vector, Int count,
|
||||
+ const char *str);
|
||||
+extern
|
||||
+void handle_post_sys_preadv(ThreadId tid, SyscallStatus* status, Addr vector, Int count);
|
||||
+
|
||||
+/* Helper function for pwritev/pwritev2. */
|
||||
+extern
|
||||
+void handle_sys_pwritev(ThreadId tid, SyscallStatus* status,
|
||||
+ Int fd, Addr vector, Int count,
|
||||
+ const char *str);
|
||||
|
||||
DECL_TEMPLATE(generic, sys_ni_syscall); // * P -- unimplemented
|
||||
DECL_TEMPLATE(generic, sys_exit);
|
||||
diff --git a/coregrind/m_syswrap/priv_syswrap-linux.h b/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
index be2f9bdde..8ce8ef3d5 100644
|
||||
--- a/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
+++ b/coregrind/m_syswrap/priv_syswrap-linux.h
|
||||
@@ -46,7 +46,9 @@ DECL_TEMPLATE(linux, sys_oldumount);
|
||||
DECL_TEMPLATE(linux, sys_umount);
|
||||
DECL_TEMPLATE(linux, sys_perf_event_open);
|
||||
DECL_TEMPLATE(linux, sys_preadv);
|
||||
+DECL_TEMPLATE(linux, sys_preadv2);
|
||||
DECL_TEMPLATE(linux, sys_pwritev);
|
||||
+DECL_TEMPLATE(linux, sys_pwritev2);
|
||||
DECL_TEMPLATE(linux, sys_sendmmsg);
|
||||
DECL_TEMPLATE(linux, sys_recvmmsg);
|
||||
DECL_TEMPLATE(linux, sys_dup3);
|
||||
diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
index 382dc65cf..9b8068d0f 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-amd64-linux.c
|
||||
@@ -857,6 +857,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
// LIN__(__NR_kexec_file_load, sys_ni_syscall), // 320
|
||||
LINXY(__NR_bpf, sys_bpf), // 321
|
||||
|
||||
+ LINXY(__NR_preadv2, sys_preadv2), // 327
|
||||
+ LINX_(__NR_pwritev2, sys_pwritev2), // 328
|
||||
|
||||
LINXY(__NR_statx, sys_statx), // 332
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
index c700e3dbe..d12d40632 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
@@ -818,8 +818,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 283
|
||||
// (__NR_mlock2, sys_ni_syscall), // 284
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 285
|
||||
- // (__NR_preadv2, sys_ni_syscall), // 286
|
||||
- // (__NR_pwritev2, sys_ni_syscall), // 287
|
||||
+ LINX_(__NR_preadv2, sys_ni_syscall), // 286
|
||||
+ LINX_(__NR_pwritev2, sys_ni_syscall), // 287
|
||||
// (__NR_pkey_mprotect, sys_ni_syscall), // 288
|
||||
// (__NR_pkey_alloc, sys_ni_syscall), // 289
|
||||
// (__NR_pkey_free, sys_ni_syscall), // 290
|
||||
diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c
|
||||
index 36d09d6e0..2fe15d97b 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-linux.c
|
||||
@@ -5501,12 +5501,57 @@ POST(sys_open_by_handle_at)
|
||||
/* ---------------------------------------------------------------------
|
||||
p{read,write}v wrappers
|
||||
------------------------------------------------------------------ */
|
||||
+/* This handles the common part of the PRE macro for preadv and preadv2. */
|
||||
+void handle_pre_sys_preadv(ThreadId tid, SyscallStatus* status,
|
||||
+ Int fd, Addr vector, Int count, const char *str)
|
||||
+{
|
||||
+ struct vki_iovec * vec;
|
||||
+ Int i;
|
||||
+ /* safe size for the "preadv/preadv2(vector[i])" string */
|
||||
+ char tmp[30];
|
||||
+
|
||||
+ if (!ML_(fd_allowed)(fd, str, tid, False)) {
|
||||
+ SET_STATUS_Failure( VKI_EBADF );
|
||||
+ } else if (count > 0) {
|
||||
+ VG_(strcpy) (tmp, str);
|
||||
+ VG_(strcat) (tmp, "(vector)");
|
||||
+ PRE_MEM_READ( tmp, vector, count * sizeof(struct vki_iovec) );
|
||||
+
|
||||
+ if (ML_(safe_to_deref) ((void *)(Addr)vector,
|
||||
+ count * sizeof(struct vki_iovec))) {
|
||||
+ vec = (struct vki_iovec *)(Addr)vector;
|
||||
+ for (i = 0; i < count; i++) {
|
||||
+ VG_(snprintf) (tmp, 30, "%s(vector[%d])", str, i);
|
||||
+ PRE_MEM_WRITE( tmp, (Addr)vec[i].iov_base, vec[i].iov_len );
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* This handles the common part of the POST macro for preadv and preadv2. */
|
||||
+void handle_post_sys_preadv(ThreadId tid, SyscallStatus* status, Addr vector, Int count)
|
||||
+{
|
||||
+ vg_assert(SUCCESS);
|
||||
+ if (RES > 0) {
|
||||
+ Int i;
|
||||
+ struct vki_iovec * vec = (struct vki_iovec *)(Addr)vector;
|
||||
+ Int remains = RES;
|
||||
+
|
||||
+ /* RES holds the number of bytes read. */
|
||||
+ for (i = 0; i < count; i++) {
|
||||
+ Int nReadThisBuf = vec[i].iov_len;
|
||||
+ if (nReadThisBuf > remains) nReadThisBuf = remains;
|
||||
+ POST_MEM_WRITE( (Addr)vec[i].iov_base, nReadThisBuf );
|
||||
+ remains -= nReadThisBuf;
|
||||
+ if (remains < 0) VG_(core_panic)("preadv: remains < 0");
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
PRE(sys_preadv)
|
||||
{
|
||||
- Int i;
|
||||
- struct vki_iovec * vec;
|
||||
*flags |= SfMayBlock;
|
||||
+ const char *str = "preadv";
|
||||
#if VG_WORDSIZE == 4
|
||||
/* Note that the offset argument here is in lo+hi order on both
|
||||
big and little endian platforms... */
|
||||
@@ -5525,45 +5570,89 @@ PRE(sys_preadv)
|
||||
#else
|
||||
# error Unexpected word size
|
||||
#endif
|
||||
- if (!ML_(fd_allowed)(ARG1, "preadv", tid, False)) {
|
||||
- SET_STATUS_Failure( VKI_EBADF );
|
||||
- } else {
|
||||
- PRE_MEM_READ( "preadv(vector)", ARG2, ARG3 * sizeof(struct vki_iovec) );
|
||||
+ Int fd = ARG1;
|
||||
+ Addr vector = ARG2;
|
||||
+ Int count = ARG3;
|
||||
+
|
||||
+ handle_pre_sys_preadv(tid, status, fd, vector, count, str);
|
||||
|
||||
- if (ARG2 != 0) {
|
||||
- /* ToDo: don't do any of the following if the vector is invalid */
|
||||
- vec = (struct vki_iovec *)(Addr)ARG2;
|
||||
- for (i = 0; i < (Int)ARG3; i++)
|
||||
- PRE_MEM_WRITE( "preadv(vector[...])",
|
||||
- (Addr)vec[i].iov_base, vec[i].iov_len );
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
POST(sys_preadv)
|
||||
{
|
||||
- vg_assert(SUCCESS);
|
||||
- if (RES > 0) {
|
||||
- Int i;
|
||||
- struct vki_iovec * vec = (struct vki_iovec *)(Addr)ARG2;
|
||||
- Int remains = RES;
|
||||
+ Addr vector = ARG2;
|
||||
+ Int count = ARG3;
|
||||
|
||||
- /* RES holds the number of bytes read. */
|
||||
- for (i = 0; i < (Int)ARG3; i++) {
|
||||
- Int nReadThisBuf = vec[i].iov_len;
|
||||
- if (nReadThisBuf > remains) nReadThisBuf = remains;
|
||||
- POST_MEM_WRITE( (Addr)vec[i].iov_base, nReadThisBuf );
|
||||
- remains -= nReadThisBuf;
|
||||
- if (remains < 0) VG_(core_panic)("preadv: remains < 0");
|
||||
+ handle_post_sys_preadv(tid, status, vector, count);
|
||||
+}
|
||||
+
|
||||
+PRE(sys_preadv2)
|
||||
+{
|
||||
+ *flags |= SfMayBlock;
|
||||
+ const char *str = "preadv2";
|
||||
+#if VG_WORDSIZE == 4
|
||||
+ /* Note that the offset argument here is in lo+hi order on both
|
||||
+ big and little endian platforms... */
|
||||
+ PRINT("sys_preadv2 ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x, %" FMT_REGWORD
|
||||
+ "u, %lld, %" FMT_REGWORD "u )",
|
||||
+ ARG1, ARG2, ARG3, (Long)LOHI64(ARG4,ARG5), ARG6);
|
||||
+ PRE_REG_READ6(ssize_t, "preadv2",
|
||||
+ unsigned long, fd, const struct iovec *, vector,
|
||||
+ unsigned long, count, vki_u32, offset_low,
|
||||
+ vki_u32, offset_high, unsigned long, flags);
|
||||
+#elif VG_WORDSIZE == 8
|
||||
+ PRINT("sys_preadv2 ( %lu, %#lx, %lu, %ld, %lu )", ARG1, ARG2, ARG3, SARG4, ARG5);
|
||||
+ PRE_REG_READ5(ssize_t, "preadv2",
|
||||
+ unsigned long, fd, const struct iovec *, vector,
|
||||
+ unsigned long, count, Word, offset, unsigned long, flags);
|
||||
+#else
|
||||
+# error Unexpected word size
|
||||
+#endif
|
||||
+ Int fd = ARG1;
|
||||
+ Addr vector = ARG2;
|
||||
+ Int count = ARG3;
|
||||
+
|
||||
+ handle_pre_sys_preadv(tid, status, fd, vector, count, str);
|
||||
+}
|
||||
+
|
||||
+POST(sys_preadv2)
|
||||
+{
|
||||
+ Addr vector = ARG2;
|
||||
+ Int count = ARG3;
|
||||
+
|
||||
+ handle_post_sys_preadv(tid, status, vector, count);
|
||||
+}
|
||||
+
|
||||
+/* This handles the common part of the PRE macro for pwritev and pwritev2. */
|
||||
+void handle_sys_pwritev(ThreadId tid, SyscallStatus* status,
|
||||
+ Int fd, Addr vector, Int count, const char *str)
|
||||
+{
|
||||
+ Int i;
|
||||
+ struct vki_iovec * vec;
|
||||
+ /* safe size for the "preadv/preadv2(vector[i])" string */
|
||||
+ char tmp[30];
|
||||
+
|
||||
+ if (!ML_(fd_allowed)(fd, str, tid, False)) {
|
||||
+ SET_STATUS_Failure( VKI_EBADF );
|
||||
+ } else if (count > 0) {
|
||||
+ VG_(strcpy) (tmp, str);
|
||||
+ VG_(strcat) (tmp, "(vector)");
|
||||
+ PRE_MEM_READ( tmp, vector, count * sizeof(struct vki_iovec) );
|
||||
+ if (ML_(safe_to_deref) ((void *)(Addr)vector,
|
||||
+ count * sizeof(struct vki_iovec))) {
|
||||
+ vec = (struct vki_iovec *)(Addr)vector;
|
||||
+ for (i = 0; i < count; i++) {
|
||||
+ VG_(snprintf) (tmp, 30, "%s(vector[%d])", str, i);
|
||||
+ PRE_MEM_READ( tmp, (Addr)vec[i].iov_base, vec[i].iov_len );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PRE(sys_pwritev)
|
||||
{
|
||||
- Int i;
|
||||
- struct vki_iovec * vec;
|
||||
*flags |= SfMayBlock;
|
||||
+ const char *str = "pwritev";
|
||||
#if VG_WORDSIZE == 4
|
||||
/* Note that the offset argument here is in lo+hi order on both
|
||||
big and little endian platforms... */
|
||||
@@ -5581,19 +5670,41 @@ PRE(sys_pwritev)
|
||||
#else
|
||||
# error Unexpected word size
|
||||
#endif
|
||||
- if (!ML_(fd_allowed)(ARG1, "pwritev", tid, False)) {
|
||||
- SET_STATUS_Failure( VKI_EBADF );
|
||||
- } else {
|
||||
- PRE_MEM_READ( "pwritev(vector)",
|
||||
- ARG2, ARG3 * sizeof(struct vki_iovec) );
|
||||
- if (ARG2 != 0) {
|
||||
- /* ToDo: don't do any of the following if the vector is invalid */
|
||||
- vec = (struct vki_iovec *)(Addr)ARG2;
|
||||
- for (i = 0; i < (Int)ARG3; i++)
|
||||
- PRE_MEM_READ( "pwritev(vector[...])",
|
||||
- (Addr)vec[i].iov_base, vec[i].iov_len );
|
||||
- }
|
||||
- }
|
||||
+ Int fd = ARG1;
|
||||
+ Addr vector = ARG2;
|
||||
+ Int count = ARG3;
|
||||
+
|
||||
+ handle_sys_pwritev(tid, status, fd, vector, count, str);
|
||||
+}
|
||||
+
|
||||
+PRE(sys_pwritev2)
|
||||
+{
|
||||
+ *flags |= SfMayBlock;
|
||||
+ const char *str = "pwritev2";
|
||||
+#if VG_WORDSIZE == 4
|
||||
+ /* Note that the offset argument here is in lo+hi order on both
|
||||
+ big and little endian platforms... */
|
||||
+ PRINT("sys_pwritev2 ( %" FMT_REGWORD "u, %#" FMT_REGWORD "x, %" FMT_REGWORD
|
||||
+ "u, %lld, %" FMT_REGWORD "u )",
|
||||
+ ARG1, ARG2, ARG3, (Long)LOHI64(ARG4,ARG5), ARG6);
|
||||
+ PRE_REG_READ6(ssize_t, "pwritev2",
|
||||
+ unsigned long, fd, const struct iovec *, vector,
|
||||
+ unsigned long, count, vki_u32, offset_low,
|
||||
+ vki_u32, offset_high, unsigned long, flags);
|
||||
+#elif VG_WORDSIZE == 8
|
||||
+ /* Note offset_high isn't actually used? */
|
||||
+ PRE_REG_READ6(ssize_t, "pwritev2",
|
||||
+ unsigned long, fd, const struct iovec *, vector,
|
||||
+ unsigned long, count, Word, offset,
|
||||
+ Word, offset_high, unsigned long, flags);
|
||||
+#else
|
||||
+# error Unexpected word size
|
||||
+#endif
|
||||
+ Int fd = ARG1;
|
||||
+ Addr vector = ARG2;
|
||||
+ Int count = ARG3;
|
||||
+
|
||||
+ handle_sys_pwritev(tid, status, fd, vector, count, str);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
index baa2934ab..d65a664dd 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
|
||||
@@ -1006,6 +1006,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 365
|
||||
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 379
|
||||
+ LINX_(__NR_preadv2, sys_preadv2), // 380
|
||||
+ LINX_(__NR_pwritev2, sys_pwritev2), // 381
|
||||
|
||||
LINXY(__NR_statx, sys_statx), // 383
|
||||
};
|
||||
diff --git a/coregrind/m_syswrap/syswrap-s390x-linux.c b/coregrind/m_syswrap/syswrap-s390x-linux.c
|
||||
index 1481e768b..3354d41c0 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-s390x-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-s390x-linux.c
|
||||
@@ -853,6 +853,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINX_(__NR_shutdown, sys_shutdown), // 373
|
||||
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 375
|
||||
+ LINXY(__NR_preadv2, sys_preadv2), // 376
|
||||
+ LINX_(__NR_pwritev2, sys_pwritev2), // 377
|
||||
|
||||
LINXY(__NR_statx, sys_statx), // 379
|
||||
};
|
||||
diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
index 9ff53a92a..33d1213a3 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-x86-linux.c
|
||||
@@ -1607,6 +1607,8 @@ static SyscallTableEntry syscall_table[] = {
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 375
|
||||
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 377
|
||||
+ LINXY(__NR_preadv2, sys_preadv2), // 378
|
||||
+ LINX_(__NR_pwritev2, sys_pwritev2), // 379
|
||||
|
||||
LINXY(__NR_pkey_mprotect, sys_pkey_mprotect), // 380
|
||||
LINX_(__NR_pkey_alloc, sys_pkey_alloc), // 381
|
||||
diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am
|
||||
index 00e99a52a..e13325869 100644
|
||||
--- a/memcheck/tests/linux/Makefile.am
|
||||
+++ b/memcheck/tests/linux/Makefile.am
|
||||
@@ -26,7 +26,9 @@ EXTRA_DIST = \
|
||||
timerfd-syscall.vgtest timerfd-syscall.stderr.exp \
|
||||
with-space.stderr.exp with-space.stdout.exp with-space.vgtest \
|
||||
proc-auxv.vgtest proc-auxv.stderr.exp getregset.vgtest \
|
||||
- getregset.stderr.exp getregset.stdout.exp
|
||||
+ getregset.stderr.exp getregset.stdout.exp \
|
||||
+ sys-preadv_pwritev.vgtest sys-preadv_pwritev.stderr.exp \
|
||||
+ sys-preadv2_pwritev2.vgtest sys-preadv2_pwritev2.stderr.exp
|
||||
|
||||
check_PROGRAMS = \
|
||||
brk \
|
||||
@@ -54,6 +56,14 @@ if HAVE_COPY_FILE_RANGE
|
||||
check_PROGRAMS += sys-copy_file_range
|
||||
endif
|
||||
|
||||
+if HAVE_PREADV_PWRITEV
|
||||
+ check_PROGRAMS += sys-preadv_pwritev
|
||||
+endif
|
||||
+
|
||||
+if HAVE_PREADV2_PWRITEV2
|
||||
+ check_PROGRAMS += sys-preadv2_pwritev2
|
||||
+endif
|
||||
+
|
||||
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
|
||||
diff --git a/memcheck/tests/linux/sys-preadv2_pwritev2.c b/memcheck/tests/linux/sys-preadv2_pwritev2.c
|
||||
new file mode 100644
|
||||
index 000000000..942eab68b
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-preadv2_pwritev2.c
|
||||
@@ -0,0 +1,79 @@
|
||||
+#define _GNU_SOURCE
|
||||
+#include <fcntl.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <unistd.h>
|
||||
+#include <sys/syscall.h>
|
||||
+#include <sys/uio.h>
|
||||
+#include <string.h>
|
||||
+#include "../../memcheck.h"
|
||||
+
|
||||
+#include <errno.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ char str0[] = "hello ";
|
||||
+ char str1[] = "world\n";
|
||||
+ struct iovec iov[2];
|
||||
+ int fd;
|
||||
+
|
||||
+ fd = open("prwv2_source", O_CREAT | O_RDWR, 0644);
|
||||
+ if (fd == -1) {
|
||||
+ perror("prwv2_source");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ iov[0].iov_base = str0;
|
||||
+ iov[0].iov_len = strlen(str0);
|
||||
+ iov[1].iov_base = str1;
|
||||
+ iov[1].iov_len = strlen(str1);
|
||||
+
|
||||
+ /* Check pwritev2 and preadv2 called with the correct arguments works. */
|
||||
+ if (pwritev2(fd, iov, 2, 0, 0) == -1) {
|
||||
+ perror("pwritev2");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ if (preadv2(fd, iov, 2, 0, 0) == -1) {
|
||||
+ perror("preadv2");
|
||||
+ printf("errno: %d\n", errno);
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ /* Check valgrind will produce expected warnings for the
|
||||
+ various wrong arguments. */
|
||||
+ do {
|
||||
+ /* always allocate 16 bytes to not to have different .exps for different reg sizes */
|
||||
+ char *mem = malloc(16);
|
||||
+ void *t = (void *) &mem[0];
|
||||
+ void *z = (void *) -1;
|
||||
+ int c = *((int *) &mem[4]);
|
||||
+ int flag = *((int *) &mem[8]);
|
||||
+ pwritev2(fd, NULL, 2, 0, 0);
|
||||
+ pwritev2(fd, z, 2, 0, 0);
|
||||
+ pwritev2(fd, t, 2, 0, 0);
|
||||
+ pwritev2(fd, iov, -1, 0, 0);
|
||||
+ pwritev2(fd, iov, c, 0, 0);
|
||||
+ pwritev2(fd, iov, 2, -5, 0);
|
||||
+ pwritev2(-1, iov, 2, -5, 0);
|
||||
+ pwritev2(fd, iov, 2, -5, flag);
|
||||
+
|
||||
+ preadv2(fd, NULL, 2, 0, 0);
|
||||
+ preadv2(fd, z, 2, 0, 0);
|
||||
+ preadv2(fd, t, 2, 0, 0);
|
||||
+ preadv2(fd, iov, -1, 0, 0);
|
||||
+ preadv2(fd, iov, c, 0, 0);
|
||||
+ preadv2(fd, iov, 2, -5, 0);
|
||||
+ preadv2(-1, iov, 2, -5, 0);
|
||||
+
|
||||
+ iov[1].iov_base = (void *) -1;
|
||||
+ pwritev2(fd, iov, 2, 0, 0);
|
||||
+ preadv2(fd, iov, 2, 0, 0);
|
||||
+ free(mem);
|
||||
+ } while (0);
|
||||
+
|
||||
+ close(fd);
|
||||
+ unlink("prwv2_source");
|
||||
+ exit(EXIT_SUCCESS);
|
||||
+}
|
||||
diff --git a/memcheck/tests/linux/sys-preadv2_pwritev2.stderr.exp b/memcheck/tests/linux/sys-preadv2_pwritev2.stderr.exp
|
||||
new file mode 100644
|
||||
index 000000000..e11f2a51d
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-preadv2_pwritev2.stderr.exp
|
||||
@@ -0,0 +1,56 @@
|
||||
+Syscall param pwritev2(vector) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:53)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param pwritev2(vector) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:54)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param pwritev2(vector) points to uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:55)
|
||||
+ Address 0x........ is 0 bytes inside a block of size 16 alloc'd
|
||||
+ at 0x........: malloc (vg_replace_malloc.c:...)
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:48)
|
||||
+
|
||||
+Syscall param pwritev2(count) contains uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:57)
|
||||
+
|
||||
+Syscall param pwritev2(flags) contains uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:60)
|
||||
+
|
||||
+Syscall param preadv2(vector) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:62)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param preadv2(vector) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:63)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param preadv2(vector) points to uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:64)
|
||||
+ Address 0x........ is 0 bytes inside a block of size 16 alloc'd
|
||||
+ at 0x........: malloc (vg_replace_malloc.c:...)
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:48)
|
||||
+
|
||||
+Syscall param preadv2(count) contains uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:66)
|
||||
+
|
||||
+Syscall param pwritev2(vector[1]) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:71)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param preadv2(vector[1]) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv2_pwritev2.c:72)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
diff --git a/memcheck/tests/linux/sys-preadv2_pwritev2.vgtest b/memcheck/tests/linux/sys-preadv2_pwritev2.vgtest
|
||||
new file mode 100644
|
||||
index 000000000..5cd23aacd
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-preadv2_pwritev2.vgtest
|
||||
@@ -0,0 +1,3 @@
|
||||
+prereq: test -e sys-preadv2_pwritev2
|
||||
+prog: sys-preadv2_pwritev2
|
||||
+vgopts: -q
|
||||
diff --git a/memcheck/tests/linux/sys-preadv_pwritev.c b/memcheck/tests/linux/sys-preadv_pwritev.c
|
||||
new file mode 100644
|
||||
index 000000000..f5087dddc
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-preadv_pwritev.c
|
||||
@@ -0,0 +1,77 @@
|
||||
+#define _GNU_SOURCE
|
||||
+#include <fcntl.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <unistd.h>
|
||||
+#include <sys/syscall.h>
|
||||
+#include <sys/uio.h>
|
||||
+#include <string.h>
|
||||
+#include "../../memcheck.h"
|
||||
+
|
||||
+#include <errno.h>
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ char str0[] = "hello ";
|
||||
+ char str1[] = "world\n";
|
||||
+ struct iovec iov[2];
|
||||
+ int fd;
|
||||
+
|
||||
+ fd = open("prwv_source", O_CREAT | O_RDWR, 0644);
|
||||
+ if (fd == -1) {
|
||||
+ perror("prwv2_source");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ iov[0].iov_base = str0;
|
||||
+ iov[0].iov_len = strlen(str0);
|
||||
+ iov[1].iov_base = str1;
|
||||
+ iov[1].iov_len = strlen(str1);
|
||||
+
|
||||
+ /* Check pwritev and preadv called with the correct arguments works. */
|
||||
+ if (pwritev(fd, iov, 2, 0) == -1) {
|
||||
+ perror("pwritev");
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ if (preadv(fd, iov, 2, 0) == -1) {
|
||||
+ perror("preadv");
|
||||
+ printf("errno: %d\n", errno);
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ /* Check valgrind will produce expected warnings for the
|
||||
+ various wrong arguments. */
|
||||
+ do {
|
||||
+ /* always allocate 16 bytes to not to have different .exps for different reg sizes */
|
||||
+ char *mem = malloc(16);
|
||||
+ void *t = (void *) &mem[0];
|
||||
+ void *z = (void *) -1;
|
||||
+ int c = *((int *) &mem[4]);
|
||||
+ pwritev(fd, NULL, 2, 0);
|
||||
+ pwritev(fd, z, 2, 0);
|
||||
+ pwritev(fd, t, 2, 0);
|
||||
+ pwritev(fd, iov, -1, 0);
|
||||
+ pwritev(fd, iov, c, 0);
|
||||
+ pwritev(fd, iov, 2, -5);
|
||||
+ pwritev(-1, iov, 2, -5);
|
||||
+
|
||||
+ preadv(fd, NULL, 2, 0);
|
||||
+ preadv(fd, z, 2, 0);
|
||||
+ preadv(fd, t, 2, 0);
|
||||
+ preadv(fd, iov, -1, 0);
|
||||
+ preadv(fd, iov, c, 0);
|
||||
+ preadv(fd, iov, 2, -5);
|
||||
+ preadv(-1, iov, 2, -5);
|
||||
+
|
||||
+ iov[1].iov_base = (void *) -1;
|
||||
+ pwritev(fd, iov, 2, 0);
|
||||
+ preadv(fd, iov, 2, 0);
|
||||
+ free(mem);
|
||||
+ } while (0);
|
||||
+
|
||||
+ close(fd);
|
||||
+ unlink("prwv_source");
|
||||
+ exit(EXIT_SUCCESS);
|
||||
+}
|
||||
diff --git a/memcheck/tests/linux/sys-preadv_pwritev.stderr.exp b/memcheck/tests/linux/sys-preadv_pwritev.stderr.exp
|
||||
new file mode 100644
|
||||
index 000000000..4fede44d8
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-preadv_pwritev.stderr.exp
|
||||
@@ -0,0 +1,52 @@
|
||||
+Syscall param pwritev(vector) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:52)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param pwritev(vector) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:53)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param pwritev(vector) points to uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:54)
|
||||
+ Address 0x........ is 0 bytes inside a block of size 16 alloc'd
|
||||
+ at 0x........: malloc (vg_replace_malloc.c:...)
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:48)
|
||||
+
|
||||
+Syscall param pwritev(count) contains uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:56)
|
||||
+
|
||||
+Syscall param preadv(vector) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:60)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param preadv(vector) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:61)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param preadv(vector) points to uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:62)
|
||||
+ Address 0x........ is 0 bytes inside a block of size 16 alloc'd
|
||||
+ at 0x........: malloc (vg_replace_malloc.c:...)
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:48)
|
||||
+
|
||||
+Syscall param preadv(count) contains uninitialised byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:64)
|
||||
+
|
||||
+Syscall param pwritev(vector[1]) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:69)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
+Syscall param preadv(vector[1]) points to unaddressable byte(s)
|
||||
+ ...
|
||||
+ by 0x........: main (sys-preadv_pwritev.c:70)
|
||||
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
|
||||
+
|
||||
diff --git a/memcheck/tests/linux/sys-preadv_pwritev.vgtest b/memcheck/tests/linux/sys-preadv_pwritev.vgtest
|
||||
new file mode 100644
|
||||
index 000000000..f07dc2935
|
||||
--- /dev/null
|
||||
+++ b/memcheck/tests/linux/sys-preadv_pwritev.vgtest
|
||||
@@ -0,0 +1,3 @@
|
||||
+prereq: test -e sys-preadv_pwritev
|
||||
+prog: sys-preadv_pwritev
|
||||
+vgopts: -q
|
||||
|
||||
commit 514f899388e05142513ff3f679a9e0131145e34e
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Wed Jul 3 10:27:17 2019 +0200
|
||||
|
||||
Hook up preadv2 and pwritev2 correctly for arm64.
|
||||
|
||||
Use the correct generic linux sys wrapper.
|
||||
|
||||
Followup for https://bugs.kde.org/408414
|
||||
|
||||
diff --git a/coregrind/m_syswrap/syswrap-arm64-linux.c b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
index d12d40632..91329b682 100644
|
||||
--- a/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
+++ b/coregrind/m_syswrap/syswrap-arm64-linux.c
|
||||
@@ -818,8 +818,8 @@ static SyscallTableEntry syscall_main_table[] = {
|
||||
LINX_(__NR_membarrier, sys_membarrier), // 283
|
||||
// (__NR_mlock2, sys_ni_syscall), // 284
|
||||
LINX_(__NR_copy_file_range, sys_copy_file_range), // 285
|
||||
- LINX_(__NR_preadv2, sys_ni_syscall), // 286
|
||||
- LINX_(__NR_pwritev2, sys_ni_syscall), // 287
|
||||
+ LINXY(__NR_preadv2, sys_preadv2), // 286
|
||||
+ LINX_(__NR_pwritev2, sys_pwritev2), // 287
|
||||
// (__NR_pkey_mprotect, sys_ni_syscall), // 288
|
||||
// (__NR_pkey_alloc, sys_ni_syscall), // 289
|
||||
// (__NR_pkey_free, sys_ni_syscall), // 290
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
commit 3bac39a10abf292d332bb20ab58c6dd5c28f9108
|
||||
Author: Eugene Syromyatnikov <evgsyr@gmail.com>
|
||||
Date: Fri Mar 8 04:07:00 2019 +0100
|
||||
|
||||
include/vki: fix vki_siginfo_t definition on amd64, arm64, and ppc64
|
||||
|
||||
As it turned out, the size of vki_siginfo_t is incorrect on these 64-bit
|
||||
architectures:
|
||||
|
||||
(gdb) p sizeof(vki_siginfo_t)
|
||||
$1 = 136
|
||||
(gdb) ptype struct vki_siginfo
|
||||
type = struct vki_siginfo {
|
||||
int si_signo;
|
||||
int si_errno;
|
||||
int si_code;
|
||||
union {
|
||||
int _pad[29];
|
||||
struct {...} _kill;
|
||||
struct {...} _timer;
|
||||
struct {...} _rt;
|
||||
struct {...} _sigchld;
|
||||
struct {...} _sigfault;
|
||||
struct {...} _sigpoll;
|
||||
} _sifields;
|
||||
}
|
||||
|
||||
It looks like that for this architecture, __VKI_ARCH_SI_PREAMBLE_SIZE
|
||||
hasn't been defined properly, which resulted in incorrect
|
||||
VKI_SI_PAD_SIZE calculation (29 instead of 28).
|
||||
|
||||
<6a9e4> DW_AT_name : (indirect string, offset: 0xcf59): _sifields
|
||||
<6a9ef> DW_AT_data_member_location: 16
|
||||
|
||||
This issue has been discovered with strace's "make check-valgrind-memcheck",
|
||||
which produced false out-of-bounds writes on ptrace(PTRACE_GETSIGINFO) calls:
|
||||
|
||||
SYSCALL[24264,1](101) sys_ptrace ( 16898, 24283, 0x0, 0x606bd40 )
|
||||
==24264== Syscall param ptrace(getsiginfo) points to unaddressable byte(s)
|
||||
==24264== at 0x575C06E: ptrace (ptrace.c:45)
|
||||
==24264== by 0x443244: next_event (strace.c:2431)
|
||||
==24264== by 0x443D30: main (strace.c:2845)
|
||||
==24264== Address 0x606bdc0 is 0 bytes after a block of size 144 alloc'd
|
||||
|
||||
(Note that the address passed is 0x606bd40 and the address reported is
|
||||
0x606bdc0).
|
||||
|
||||
After the patch, no such errors observed.
|
||||
|
||||
* include/vki/vki-amd64-linux.h [__x86_64__ && __ILP32__]
|
||||
(__vki_kernel_si_clock_t): New typedef.
|
||||
[__x86_64__ && __ILP32__] (__VKI_ARCH_SI_CLOCK_T,
|
||||
__VKI_ARCH_SI_ATTRIBUTES): New macros.
|
||||
[__x86_64__ && !__ILP32__] (__VKI_ARCH_SI_PREAMBLE_SIZE): New macro,
|
||||
define to 4 ints.
|
||||
* include/vki/vki-arm64-linux.h (__VKI_ARCH_SI_PREAMBLE_SIZE): Likewise.
|
||||
* include/vki/vki-ppc64-linux.h [__powerpc64__] (__VKI_ARCH_SI_PREAMBLE_SIZE):
|
||||
Likewise.
|
||||
* include/vki/vki-linux.h [!__VKI_ARCH_SI_CLOCK_T]
|
||||
(__VKI_ARCH_SI_CLOCK_T): New macro, define to vki_clock_t.
|
||||
[!__VKI_ARCH_SI_ATTRIBUTES] (__VKI_ARCH_SI_ATTRIBUTES): New macro,
|
||||
define to nil.
|
||||
(struct vki_siginfo): Use __VKI_ARCH_SI_CLOCK_T type for _utime and
|
||||
_stime fields. Add __VKI_ARCH_SI_ATTRIBUTES.
|
||||
|
||||
Resolves: https://bugs.kde.org/show_bug.cgi?id=405201
|
||||
Reported-by: Dmitry V. Levin <ldv@altlinux.org>
|
||||
Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
|
||||
|
||||
diff --git a/include/vki/vki-amd64-linux.h b/include/vki/vki-amd64-linux.h
|
||||
index d6a5a77e6..fbd353aed 100644
|
||||
--- a/include/vki/vki-amd64-linux.h
|
||||
+++ b/include/vki/vki-amd64-linux.h
|
||||
@@ -297,6 +297,21 @@ struct vki_f_owner_ex {
|
||||
#define VKI_RLIMIT_CORE 4 /* max core file size */
|
||||
#define VKI_RLIMIT_NOFILE 7 /* max number of open files */
|
||||
|
||||
+//----------------------------------------------------------------------
|
||||
+// From linux-5.0.0/arch/x86/include/uapi/asm/siginfo.h
|
||||
+//----------------------------------------------------------------------
|
||||
+
|
||||
+/* We need that to ensure that sizeof(siginfo) == 128. */
|
||||
+#ifdef __x86_64__
|
||||
+# ifdef __ILP32__
|
||||
+typedef long long __vki_kernel_si_clock_t __attribute__((aligned(4)));
|
||||
+# define __VKI_ARCH_SI_CLOCK_T __vki_kernel_si_clock_t
|
||||
+# define __VKI_ARCH_SI_ATTRIBUTES __attribute__((aligned(8)))
|
||||
+# else
|
||||
+# define __VKI_ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
//----------------------------------------------------------------------
|
||||
// From linux-2.6.9/include/asm-x86_64/socket.h
|
||||
//----------------------------------------------------------------------
|
||||
diff --git a/include/vki/vki-arm64-linux.h b/include/vki/vki-arm64-linux.h
|
||||
index ecea8cc78..69fb3ed00 100644
|
||||
--- a/include/vki/vki-arm64-linux.h
|
||||
+++ b/include/vki/vki-arm64-linux.h
|
||||
@@ -193,6 +193,12 @@ struct vki_sigcontext {
|
||||
__vki_u8 __reserved[4096] __attribute__((__aligned__(16)));
|
||||
};
|
||||
|
||||
+//----------------------------------------------------------------------
|
||||
+// From linux-5.0.0/arch/arm64/include/uapi/asm/siginfo.h
|
||||
+//----------------------------------------------------------------------
|
||||
+
|
||||
+#define __VKI_ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
|
||||
+
|
||||
//----------------------------------------------------------------------
|
||||
// From linux-3.10.5/uapi/include/asm-generic/mman-common.h
|
||||
//----------------------------------------------------------------------
|
||||
diff --git a/include/vki/vki-linux.h b/include/vki/vki-linux.h
|
||||
index 6024f2165..6903c77db 100644
|
||||
--- a/include/vki/vki-linux.h
|
||||
+++ b/include/vki/vki-linux.h
|
||||
@@ -426,6 +426,14 @@ typedef union vki_sigval {
|
||||
#define __VKI_ARCH_SI_BAND_T long
|
||||
#endif
|
||||
|
||||
+#ifndef __VKI_ARCH_SI_CLOCK_T
|
||||
+#define __VKI_ARCH_SI_CLOCK_T vki_clock_t
|
||||
+#endif
|
||||
+
|
||||
+#ifndef __VKI_ARCH_SI_ATTRIBUTES
|
||||
+#define __VKI_ARCH_SI_ATTRIBUTES
|
||||
+#endif
|
||||
+
|
||||
// [[Nb: this type changed between 2.4 and 2.6, but not in a way that
|
||||
// affects Valgrind.]]
|
||||
typedef struct vki_siginfo {
|
||||
@@ -463,8 +471,8 @@ typedef struct vki_siginfo {
|
||||
vki_pid_t _pid; /* which child */
|
||||
__VKI_ARCH_SI_UID_T _uid; /* sender's uid */
|
||||
int _status; /* exit code */
|
||||
- vki_clock_t _utime;
|
||||
- vki_clock_t _stime;
|
||||
+ __VKI_ARCH_SI_CLOCK_T _utime;
|
||||
+ __VKI_ARCH_SI_CLOCK_T _stime;
|
||||
} _sigchld;
|
||||
|
||||
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
|
||||
@@ -481,7 +489,7 @@ typedef struct vki_siginfo {
|
||||
int _fd;
|
||||
} _sigpoll;
|
||||
} _sifields;
|
||||
-} vki_siginfo_t;
|
||||
+} __VKI_ARCH_SI_ATTRIBUTES vki_siginfo_t;
|
||||
#endif
|
||||
|
||||
#define __VKI_SI_FAULT 0
|
||||
diff --git a/include/vki/vki-ppc64-linux.h b/include/vki/vki-ppc64-linux.h
|
||||
index a5e64dd39..04f72048a 100644
|
||||
--- a/include/vki/vki-ppc64-linux.h
|
||||
+++ b/include/vki/vki-ppc64-linux.h
|
||||
@@ -335,6 +335,14 @@ struct vki_sigcontext {
|
||||
long vmx_reserve[VKI_ELF_NVRREG+VKI_ELF_NVRREG+1];
|
||||
};
|
||||
|
||||
+//----------------------------------------------------------------------
|
||||
+// From linux-5.0.0/arch/powerpc/include/uapi/asm/siginfo.h
|
||||
+//----------------------------------------------------------------------
|
||||
+
|
||||
+#ifdef __powerpc64__
|
||||
+# define __VKI_ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
|
||||
+#endif
|
||||
+
|
||||
//----------------------------------------------------------------------
|
||||
// From linux-2.6.13/include/asm-ppc64/mman.h
|
||||
//----------------------------------------------------------------------
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
From abbd80e7e23deb1f27fb50410c8b3a3f7cdfb646 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Arnez <arnez@linux.ibm.com>
|
||||
Date: Wed, 12 Feb 2020 14:13:55 +0100
|
||||
Subject: [PATCH] Bug 417452 - s390_insn_store_emit: dst->tag for HRcVec128
|
||||
|
||||
It was seen that the s390 instruction selector chose a wrong addressing
|
||||
mode for storing a vector register. The VST instruction only handles
|
||||
short (12-bit unsigned) displacements, but a long (20-bit signed)
|
||||
displacement was generated instead, resulting in a panic:
|
||||
|
||||
vex: the `impossible' happened:
|
||||
s390_insn_store_emit: unknown dst->tag for HRcVec128
|
||||
|
||||
The fix prevents long displacements for vector store operations. It also
|
||||
optimizes vector store operations from an Iex_Get, by converting them to a
|
||||
memory copy. This optimization was already performed for integer
|
||||
registers.
|
||||
---
|
||||
VEX/priv/host_s390_defs.c | 2 +-
|
||||
VEX/priv/host_s390_isel.c | 67 +++++++++++++++++++++++++++------------
|
||||
2 files changed, 48 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c
|
||||
index 9ad7240c4..47928cbe1 100644
|
||||
--- a/VEX/priv/host_s390_defs.c
|
||||
+++ b/VEX/priv/host_s390_defs.c
|
||||
@@ -6314,7 +6314,7 @@ s390_insn_memcpy(UChar size, s390_amode *dst, s390_amode *src)
|
||||
insn->variant.memcpy.src = src;
|
||||
insn->variant.memcpy.dst = dst;
|
||||
|
||||
- vassert(size == 1 || size == 2 || size == 4 || size == 8);
|
||||
+ vassert(size == 1 || size == 2 || size == 4 || size == 8 || size == 16);
|
||||
|
||||
return insn;
|
||||
}
|
||||
diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c
|
||||
index 97614c873..fff81fe0f 100644
|
||||
--- a/VEX/priv/host_s390_isel.c
|
||||
+++ b/VEX/priv/host_s390_isel.c
|
||||
@@ -302,12 +302,14 @@ ulong_fits_signed_8bit(ULong val)
|
||||
return val == v;
|
||||
}
|
||||
|
||||
-/* EXPR is an expression that is used as an address. Return an s390_amode
|
||||
- for it. If select_b12_b20_only is true the returned amode must be either
|
||||
- S390_AMODE_B12 or S390_AMODE_B20. */
|
||||
+/* EXPR is an expression that is used as an address. Return an s390_amode for
|
||||
+ it. If no_index is true the returned amode must be either S390_AMODE_B12 or
|
||||
+ S390_AMODE_B20. If short_displacement is true it must be either
|
||||
+ S390_AMODE_B12 or S390_AMODE_BX12. */
|
||||
static s390_amode *
|
||||
s390_isel_amode_wrk(ISelEnv *env, IRExpr *expr,
|
||||
- Bool select_b12_b20_only __attribute__((unused)))
|
||||
+ Bool no_index __attribute__((unused)),
|
||||
+ Bool short_displacement)
|
||||
{
|
||||
if (expr->tag == Iex_Binop && expr->Iex.Binop.op == Iop_Add64) {
|
||||
IRExpr *arg1 = expr->Iex.Binop.arg1;
|
||||
@@ -328,7 +330,7 @@ s390_isel_amode_wrk(ISelEnv *env, IRExpr *expr,
|
||||
if (ulong_fits_unsigned_12bit(value)) {
|
||||
return s390_amode_b12((Int)value, s390_isel_int_expr(env, arg1));
|
||||
}
|
||||
- if (ulong_fits_signed_20bit(value)) {
|
||||
+ if (!short_displacement && ulong_fits_signed_20bit(value)) {
|
||||
return s390_amode_b20((Int)value, s390_isel_int_expr(env, arg1));
|
||||
}
|
||||
}
|
||||
@@ -348,7 +350,25 @@ s390_isel_amode(ISelEnv *env, IRExpr *expr)
|
||||
/* Address computation should yield a 64-bit value */
|
||||
vassert(typeOfIRExpr(env->type_env, expr) == Ity_I64);
|
||||
|
||||
- am = s390_isel_amode_wrk(env, expr, /* B12, B20 only */ False);
|
||||
+ am = s390_isel_amode_wrk(env, expr, False, False);
|
||||
+
|
||||
+ /* Check post-condition */
|
||||
+ vassert(s390_amode_is_sane(am));
|
||||
+
|
||||
+ return am;
|
||||
+}
|
||||
+
|
||||
+/* Sometimes we need an amode with short (12-bit) displacement. An example is
|
||||
+ the vector-store opcode. */
|
||||
+static s390_amode *
|
||||
+s390_isel_amode_short(ISelEnv *env, IRExpr *expr)
|
||||
+{
|
||||
+ s390_amode *am;
|
||||
+
|
||||
+ /* Address computation should yield a 64-bit value */
|
||||
+ vassert(typeOfIRExpr(env->type_env, expr) == Ity_I64);
|
||||
+
|
||||
+ am = s390_isel_amode_wrk(env, expr, False, True);
|
||||
|
||||
/* Check post-condition */
|
||||
vassert(s390_amode_is_sane(am));
|
||||
@@ -379,7 +399,7 @@ s390_isel_amode_b12_b20(ISelEnv *env, IRExpr *expr)
|
||||
/* Address computation should yield a 64-bit value */
|
||||
vassert(typeOfIRExpr(env->type_env, expr) == Ity_I64);
|
||||
|
||||
- am = s390_isel_amode_wrk(env, expr, /* B12, B20 only */ True);
|
||||
+ am = s390_isel_amode_wrk(env, expr, True, False);
|
||||
|
||||
/* Check post-condition */
|
||||
vassert(s390_amode_is_sane(am) &&
|
||||
@@ -4727,7 +4747,26 @@ s390_isel_stmt(ISelEnv *env, IRStmt *stmt)
|
||||
|
||||
if (stmt->Ist.Store.end != Iend_BE) goto stmt_fail;
|
||||
|
||||
- am = s390_isel_amode(env, stmt->Ist.Store.addr);
|
||||
+ if (tyd == Ity_V128) {
|
||||
+ am = s390_isel_amode_short(env, stmt->Ist.Store.addr);
|
||||
+ } else {
|
||||
+ am = s390_isel_amode(env, stmt->Ist.Store.addr);
|
||||
+ }
|
||||
+
|
||||
+ /* Check whether we can use a memcpy. Currently, the restriction
|
||||
+ is that both amodes need to be B12, so MVC can be emitted.
|
||||
+ We do not consider a store whose data expression is a load because
|
||||
+ we don't want to deal with overlapping locations. */
|
||||
+ /* store(get) never overlaps*/
|
||||
+ if (am->tag == S390_AMODE_B12 &&
|
||||
+ stmt->Ist.Store.data->tag == Iex_Get) {
|
||||
+ UInt offset = stmt->Ist.Store.data->Iex.Get.offset;
|
||||
+ s390_amode *from = s390_amode_for_guest_state(offset);
|
||||
+ if (from->tag == S390_AMODE_B12) {
|
||||
+ addInstr(env, s390_insn_memcpy(sizeofIRType(tyd), am, from));
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
switch (tyd) {
|
||||
case Ity_I8:
|
||||
@@ -4742,18 +4781,6 @@ s390_isel_stmt(ISelEnv *env, IRStmt *stmt)
|
||||
addInstr(env, s390_insn_mimm(sizeofIRType(tyd), am, value));
|
||||
return;
|
||||
}
|
||||
- /* Check whether we can use a memcpy here. Currently, the restriction
|
||||
- is that both amodes need to be B12, so MVC can be emitted.
|
||||
- We do not consider a store whose data expression is a load because
|
||||
- we don't want to deal with overlapping locations. */
|
||||
- /* store(get) never overlaps*/
|
||||
- if (am->tag == S390_AMODE_B12 &&
|
||||
- stmt->Ist.Store.data->tag == Iex_Get) {
|
||||
- UInt offset = stmt->Ist.Store.data->Iex.Get.offset;
|
||||
- s390_amode *from = s390_amode_for_guest_state(offset);
|
||||
- addInstr(env, s390_insn_memcpy(sizeofIRType(tyd), am, from));
|
||||
- return;
|
||||
- }
|
||||
/* General case: compile data into a register */
|
||||
src = s390_isel_int_expr(env, stmt->Ist.Store.data);
|
||||
break;
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
|
@ -1,436 +0,0 @@
|
|||
diff --git a/README.s390 b/README.s390
|
||||
index ac9485a62..7df386ef4 100644
|
||||
--- a/README.s390
|
||||
+++ b/README.s390
|
||||
@@ -11,7 +11,10 @@ Limitations
|
||||
-----------
|
||||
- 31-bit client programs are not supported.
|
||||
- Hexadecimal floating point is not supported.
|
||||
-- Transactional memory is not supported.
|
||||
+- Transactional memory is not supported. The transactional-execution
|
||||
+ facility is masked off from HWCAP.
|
||||
+- FP signalling is not accurate. E.g., the "compare and signal"
|
||||
+ instructions behave like their non-signalling counterparts.
|
||||
- memcheck, cachegrind, drd, helgrind, massif, lackey, and none are
|
||||
supported.
|
||||
- On machine models predating z10, cachegrind will assume a z10 cache
|
||||
@@ -21,8 +24,6 @@ Limitations
|
||||
- Some gcc versions use mvc to copy 4/8 byte values. This will affect
|
||||
certain debug messages. For example, memcheck will complain about
|
||||
4 one-byte reads/writes instead of just a single read/write.
|
||||
-- The transactional-execution facility is not supported; it is masked
|
||||
- off from HWCAP.
|
||||
|
||||
|
||||
Hardware facilities
|
||||
diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c
|
||||
index a8f0d3a07..1f626f722 100644
|
||||
--- a/VEX/priv/guest_s390_toIR.c
|
||||
+++ b/VEX/priv/guest_s390_toIR.c
|
||||
@@ -1204,6 +1204,16 @@ get_dpr_dw0(UInt archreg)
|
||||
return IRExpr_Get(fpr_dw0_offset(archreg), Ity_D64);
|
||||
}
|
||||
|
||||
+/* Read a float of given type from an fpr. */
|
||||
+static IRExpr *
|
||||
+get_fpr_float(UInt archreg, IRType type)
|
||||
+{
|
||||
+ if (type == Ity_F128)
|
||||
+ return get_fpr_pair(archreg);
|
||||
+ else
|
||||
+ return IRExpr_Get(fpr_offset(archreg), type);
|
||||
+}
|
||||
+
|
||||
/*------------------------------------------------------------*/
|
||||
/*--- gpr registers ---*/
|
||||
/*------------------------------------------------------------*/
|
||||
@@ -14055,94 +14065,102 @@ s390_irgen_AXBR(UChar r1, UChar r2)
|
||||
return "axbr";
|
||||
}
|
||||
|
||||
+/* Helper for "compare" insns CEBR, CDBR, CXBR, and their signalling
|
||||
+ counterparts. */
|
||||
static const HChar *
|
||||
-s390_irgen_CEBR(UChar r1, UChar r2)
|
||||
+s390_irgen_CxBR(const HChar *mnem, UChar r1, UChar r2, IRType type, IROp cmp_op)
|
||||
{
|
||||
- IRTemp op1 = newTemp(Ity_F32);
|
||||
- IRTemp op2 = newTemp(Ity_F32);
|
||||
+ IRTemp op1 = newTemp(type);
|
||||
+ IRTemp op2 = newTemp(type);
|
||||
IRTemp cc_vex = newTemp(Ity_I32);
|
||||
IRTemp cc_s390 = newTemp(Ity_I32);
|
||||
|
||||
- assign(op1, get_fpr_w0(r1));
|
||||
- assign(op2, get_fpr_w0(r2));
|
||||
- assign(cc_vex, binop(Iop_CmpF32, mkexpr(op1), mkexpr(op2)));
|
||||
+ assign(op1, get_fpr_float(r1, type));
|
||||
+ assign(op2, get_fpr_float(r2, type));
|
||||
+ assign(cc_vex, binop(cmp_op, mkexpr(op1), mkexpr(op2)));
|
||||
|
||||
assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex));
|
||||
s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
|
||||
+ return mnem;
|
||||
+}
|
||||
+
|
||||
+static const HChar *
|
||||
+s390_irgen_CEBR(UChar r1, UChar r2)
|
||||
+{
|
||||
+ return s390_irgen_CxBR("cebr", r1, r2, Ity_F32, Iop_CmpF32);
|
||||
+}
|
||||
|
||||
- return "cebr";
|
||||
+static const HChar *
|
||||
+s390_irgen_KEBR(UChar r1, UChar r2)
|
||||
+{
|
||||
+ return s390_irgen_CxBR("kebr", r1, r2, Ity_F32, Iop_CmpF32);
|
||||
}
|
||||
|
||||
static const HChar *
|
||||
s390_irgen_CDBR(UChar r1, UChar r2)
|
||||
{
|
||||
- IRTemp op1 = newTemp(Ity_F64);
|
||||
- IRTemp op2 = newTemp(Ity_F64);
|
||||
- IRTemp cc_vex = newTemp(Ity_I32);
|
||||
- IRTemp cc_s390 = newTemp(Ity_I32);
|
||||
+ return s390_irgen_CxBR("cdbr", r1, r2, Ity_F64, Iop_CmpF64);
|
||||
+}
|
||||
|
||||
- assign(op1, get_fpr_dw0(r1));
|
||||
- assign(op2, get_fpr_dw0(r2));
|
||||
- assign(cc_vex, binop(Iop_CmpF64, mkexpr(op1), mkexpr(op2)));
|
||||
+static const HChar *
|
||||
+s390_irgen_KDBR(UChar r1, UChar r2)
|
||||
+{
|
||||
+ return s390_irgen_CxBR("kdbr", r1, r2, Ity_F64, Iop_CmpF64);
|
||||
+}
|
||||
|
||||
- assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex));
|
||||
- s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
|
||||
+static const HChar *
|
||||
+s390_irgen_CXBR(UChar r1, UChar r2)
|
||||
+{
|
||||
+ return s390_irgen_CxBR("cxbr", r1, r2, Ity_F128, Iop_CmpF128);
|
||||
+}
|
||||
|
||||
- return "cdbr";
|
||||
+static const HChar *
|
||||
+s390_irgen_KXBR(UChar r1, UChar r2)
|
||||
+{
|
||||
+ return s390_irgen_CxBR("kxbr", r1, r2, Ity_F128, Iop_CmpF128);
|
||||
}
|
||||
|
||||
+/* Helper for "compare" insns CEB, CDB, and their signalling counterparts. */
|
||||
static const HChar *
|
||||
-s390_irgen_CXBR(UChar r1, UChar r2)
|
||||
+s390_irgen_CxB(const HChar *mnem, UChar r1, IRTemp op2addr, IRType type, IROp cmp_op)
|
||||
{
|
||||
- IRTemp op1 = newTemp(Ity_F128);
|
||||
- IRTemp op2 = newTemp(Ity_F128);
|
||||
+ IRTemp op1 = newTemp(type);
|
||||
+ IRTemp op2 = newTemp(type);
|
||||
IRTemp cc_vex = newTemp(Ity_I32);
|
||||
IRTemp cc_s390 = newTemp(Ity_I32);
|
||||
|
||||
- assign(op1, get_fpr_pair(r1));
|
||||
- assign(op2, get_fpr_pair(r2));
|
||||
- assign(cc_vex, binop(Iop_CmpF128, mkexpr(op1), mkexpr(op2)));
|
||||
+ assign(op1, get_fpr_float(r1, type));
|
||||
+ assign(op2, load(type, mkexpr(op2addr)));
|
||||
+ assign(cc_vex, binop(cmp_op, mkexpr(op1), mkexpr(op2)));
|
||||
|
||||
assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex));
|
||||
s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
|
||||
-
|
||||
- return "cxbr";
|
||||
+ return mnem;
|
||||
}
|
||||
|
||||
static const HChar *
|
||||
s390_irgen_CEB(UChar r1, IRTemp op2addr)
|
||||
{
|
||||
- IRTemp op1 = newTemp(Ity_F32);
|
||||
- IRTemp op2 = newTemp(Ity_F32);
|
||||
- IRTemp cc_vex = newTemp(Ity_I32);
|
||||
- IRTemp cc_s390 = newTemp(Ity_I32);
|
||||
-
|
||||
- assign(op1, get_fpr_w0(r1));
|
||||
- assign(op2, load(Ity_F32, mkexpr(op2addr)));
|
||||
- assign(cc_vex, binop(Iop_CmpF32, mkexpr(op1), mkexpr(op2)));
|
||||
-
|
||||
- assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex));
|
||||
- s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
|
||||
+ return s390_irgen_CxB("ceb", r1, op2addr, Ity_F32, Iop_CmpF32);
|
||||
+}
|
||||
|
||||
- return "ceb";
|
||||
+static const HChar *
|
||||
+s390_irgen_KEB(UChar r1, IRTemp op2addr)
|
||||
+{
|
||||
+ return s390_irgen_CxB("keb", r1, op2addr, Ity_F32, Iop_CmpF32);
|
||||
+ return "keb";
|
||||
}
|
||||
|
||||
static const HChar *
|
||||
s390_irgen_CDB(UChar r1, IRTemp op2addr)
|
||||
{
|
||||
- IRTemp op1 = newTemp(Ity_F64);
|
||||
- IRTemp op2 = newTemp(Ity_F64);
|
||||
- IRTemp cc_vex = newTemp(Ity_I32);
|
||||
- IRTemp cc_s390 = newTemp(Ity_I32);
|
||||
-
|
||||
- assign(op1, get_fpr_dw0(r1));
|
||||
- assign(op2, load(Ity_F64, mkexpr(op2addr)));
|
||||
- assign(cc_vex, binop(Iop_CmpF64, mkexpr(op1), mkexpr(op2)));
|
||||
-
|
||||
- assign(cc_s390, convert_vex_bfpcc_to_s390(cc_vex));
|
||||
- s390_cc_thunk_put1(S390_CC_OP_SET, cc_s390, False);
|
||||
+ return s390_irgen_CxB("cdb", r1, op2addr, Ity_F64, Iop_CmpF64);
|
||||
+}
|
||||
|
||||
- return "cdb";
|
||||
+static const HChar *
|
||||
+s390_irgen_KDB(UChar r1, IRTemp op2addr)
|
||||
+{
|
||||
+ return s390_irgen_CxB("kdb", r1, op2addr, Ity_F64, Iop_CmpF64);
|
||||
}
|
||||
|
||||
static const HChar *
|
||||
@@ -19270,7 +19288,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes)
|
||||
case 0xb306: s390_format_RRE_FF(s390_irgen_LXEBR, RRE_r1(ovl),
|
||||
RRE_r2(ovl)); goto ok;
|
||||
case 0xb307: /* MXDBR */ goto unimplemented;
|
||||
- case 0xb308: /* KEBR */ goto unimplemented;
|
||||
+ case 0xb308: s390_format_RRE_FF(s390_irgen_KEBR, RRE_r1(ovl),
|
||||
+ RRE_r2(ovl)); goto ok;
|
||||
case 0xb309: s390_format_RRE_FF(s390_irgen_CEBR, RRE_r1(ovl),
|
||||
RRE_r2(ovl)); goto ok;
|
||||
case 0xb30a: s390_format_RRE_FF(s390_irgen_AEBR, RRE_r1(ovl),
|
||||
@@ -19300,7 +19319,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes)
|
||||
RRE_r2(ovl)); goto ok;
|
||||
case 0xb317: s390_format_RRE_FF(s390_irgen_MEEBR, RRE_r1(ovl),
|
||||
RRE_r2(ovl)); goto ok;
|
||||
- case 0xb318: /* KDBR */ goto unimplemented;
|
||||
+ case 0xb318: s390_format_RRE_FF(s390_irgen_KDBR, RRE_r1(ovl),
|
||||
+ RRE_r2(ovl)); goto ok;
|
||||
case 0xb319: s390_format_RRE_FF(s390_irgen_CDBR, RRE_r1(ovl),
|
||||
RRE_r2(ovl)); goto ok;
|
||||
case 0xb31a: s390_format_RRE_FF(s390_irgen_ADBR, RRE_r1(ovl),
|
||||
@@ -19351,7 +19371,8 @@ s390_decode_4byte_and_irgen(const UChar *bytes)
|
||||
case 0xb347: s390_format_RRF_UUFF(s390_irgen_FIXBRA, RRF2_m3(ovl),
|
||||
RRF2_m4(ovl), RRF2_r1(ovl),
|
||||
RRF2_r2(ovl)); goto ok;
|
||||
- case 0xb348: /* KXBR */ goto unimplemented;
|
||||
+ case 0xb348: s390_format_RRE_FF(s390_irgen_KXBR, RRE_r1(ovl),
|
||||
+ RRE_r2(ovl)); goto ok;
|
||||
case 0xb349: s390_format_RRE_FF(s390_irgen_CXBR, RRE_r1(ovl),
|
||||
RRE_r2(ovl)); goto ok;
|
||||
case 0xb34a: s390_format_RRE_FF(s390_irgen_AXBR, RRE_r1(ovl),
|
||||
@@ -21408,7 +21429,9 @@ s390_decode_6byte_and_irgen(const UChar *bytes)
|
||||
RXE_x2(ovl), RXE_b2(ovl),
|
||||
RXE_d2(ovl)); goto ok;
|
||||
case 0xed0000000007ULL: /* MXDB */ goto unimplemented;
|
||||
- case 0xed0000000008ULL: /* KEB */ goto unimplemented;
|
||||
+ case 0xed0000000008ULL: s390_format_RXE_FRRD(s390_irgen_KEB, RXE_r1(ovl),
|
||||
+ RXE_x2(ovl), RXE_b2(ovl),
|
||||
+ RXE_d2(ovl)); goto ok;
|
||||
case 0xed0000000009ULL: s390_format_RXE_FRRD(s390_irgen_CEB, RXE_r1(ovl),
|
||||
RXE_x2(ovl), RXE_b2(ovl),
|
||||
RXE_d2(ovl)); goto ok;
|
||||
@@ -21448,7 +21471,9 @@ s390_decode_6byte_and_irgen(const UChar *bytes)
|
||||
case 0xed0000000017ULL: s390_format_RXE_FRRD(s390_irgen_MEEB, RXE_r1(ovl),
|
||||
RXE_x2(ovl), RXE_b2(ovl),
|
||||
RXE_d2(ovl)); goto ok;
|
||||
- case 0xed0000000018ULL: /* KDB */ goto unimplemented;
|
||||
+ case 0xed0000000018ULL: s390_format_RXE_FRRD(s390_irgen_KDB, RXE_r1(ovl),
|
||||
+ RXE_x2(ovl), RXE_b2(ovl),
|
||||
+ RXE_d2(ovl)); goto ok;
|
||||
case 0xed0000000019ULL: s390_format_RXE_FRRD(s390_irgen_CDB, RXE_r1(ovl),
|
||||
RXE_x2(ovl), RXE_b2(ovl),
|
||||
RXE_d2(ovl)); goto ok;
|
||||
diff --git a/none/tests/s390x/bfp-4.c b/none/tests/s390x/bfp-4.c
|
||||
index c2d88818c..645421294 100644
|
||||
--- a/none/tests/s390x/bfp-4.c
|
||||
+++ b/none/tests/s390x/bfp-4.c
|
||||
@@ -1,61 +1,77 @@
|
||||
#include <stdio.h>
|
||||
|
||||
-/* Test BFP comparison for 32/64-bit. */
|
||||
+#define TEST_CxBR(insn, fmt, v1, v2) \
|
||||
+ do { \
|
||||
+ int cc; \
|
||||
+ \
|
||||
+ __asm__ volatile(insn " %[r1],%[r2]\n\t" \
|
||||
+ "ipm %[psw]\n\t" \
|
||||
+ "srl %[psw],28\n\t" \
|
||||
+ : [psw]"=d"(cc) : [r1]"f"(v1), [r2]"f"(v2) : "cc"); \
|
||||
+ if (cc == 0) \
|
||||
+ printf(insn ": " fmt " == " fmt "\n", v1, v2); \
|
||||
+ else if (cc == 1) \
|
||||
+ printf(insn ": " fmt " < " fmt "\n", v1, v2); \
|
||||
+ else if (cc == 2) \
|
||||
+ printf(insn ": " fmt " > " fmt "\n", v1, v2); \
|
||||
+ else \
|
||||
+ printf(insn ": " fmt " ?? " fmt "\n", v1, v2); \
|
||||
+ } while (0)
|
||||
|
||||
-void cebr(float v1, float v2)
|
||||
+/* Test BFP comparison for 32/64/128-bit. */
|
||||
+
|
||||
+void cebr(float a, float b)
|
||||
+{
|
||||
+ TEST_CxBR("cebr", "%g", a, b);
|
||||
+}
|
||||
+
|
||||
+void cdbr(double a, double b)
|
||||
+{
|
||||
+ TEST_CxBR("cdbr", "%g", a, b);
|
||||
+}
|
||||
+
|
||||
+void cxbr(long double a, long double b)
|
||||
{
|
||||
- int cc;
|
||||
+ TEST_CxBR("cxbr", "%Lg", a, b);
|
||||
+}
|
||||
|
||||
- __asm__ volatile("cebr %[r1],%[r2]\n\t"
|
||||
- "ipm %[psw]\n\t"
|
||||
- "srl %[psw],28\n\t"
|
||||
- : [psw]"=d"(cc) : [r1]"f"(v1), [r2]"f"(v2) : "cc");
|
||||
- if (cc == 0)
|
||||
- printf("cfebr: %f == %f\n", v1, v2);
|
||||
- if (cc == 1)
|
||||
- printf("cfebr: %f < %f\n", v1, v2);
|
||||
- if (cc == 2)
|
||||
- printf("cfebr: %f > %f\n", v1, v2);
|
||||
+void kebr(float a, float b)
|
||||
+{
|
||||
+ TEST_CxBR("kebr", "%g", a, b);
|
||||
}
|
||||
|
||||
-void cdbr(double v1, double v2)
|
||||
+void kdbr(double a, double b)
|
||||
{
|
||||
- int cc;
|
||||
+ TEST_CxBR("kdbr", "%g", a, b);
|
||||
+}
|
||||
|
||||
- __asm__ volatile("cdbr %[r1],%[r2]\n\t"
|
||||
- "ipm %[psw]\n\t"
|
||||
- "srl %[psw],28\n\t"
|
||||
- : [psw]"=d"(cc) : [r1]"f"(v1), [r2]"f"(v2) : "cc");
|
||||
- if (cc == 0)
|
||||
- printf("cdebr: %f == %f\n", v1, v2);
|
||||
- if (cc == 1)
|
||||
- printf("cdebr: %f < %f\n", v1, v2);
|
||||
- if (cc == 2)
|
||||
- printf("cdebr: %f > %f\n", v1, v2);
|
||||
+void kxbr(long double a, long double b)
|
||||
+{
|
||||
+ TEST_CxBR("kxbr", "%Lg", a, b);
|
||||
+}
|
||||
+
|
||||
+void do_compare(float a, float b)
|
||||
+{
|
||||
+ cebr(a, b);
|
||||
+ kebr(a, b);
|
||||
+ cdbr((double) a, (double) b);
|
||||
+ kdbr((double) a, (double) b);
|
||||
+ cxbr((long double) a, (long double) b);
|
||||
+ kxbr((long double) a, (long double) b);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
- float f1, f2;
|
||||
- float d1, d2;
|
||||
-
|
||||
- // compare 4 bytes
|
||||
- f1 = 3.14f;
|
||||
- f2 = f1;
|
||||
- cebr(f1, f2);
|
||||
- f2 = f1 + 10.;
|
||||
- cebr(f1, f2);
|
||||
- f2 = f1 - 100.;
|
||||
- cebr(f1, f2);
|
||||
-
|
||||
- // compare 8 bytes
|
||||
- d1 = 2.78;
|
||||
- d2 = d1;
|
||||
- cdbr(d1, d2);
|
||||
- d2 = d1 + 10.;
|
||||
- cdbr(d1, d2);
|
||||
- d2 = d1 - 100.;
|
||||
- cdbr(d1, d2);
|
||||
+ float inf = 1.f / 0.;
|
||||
+ float neg_inf = -1.f / 0.;
|
||||
|
||||
+ do_compare(3.14f, 3.14f);
|
||||
+ do_compare(-2.78f, 2.78f);
|
||||
+ do_compare(inf, inf);
|
||||
+ do_compare(inf, neg_inf);
|
||||
+ do_compare(neg_inf, neg_inf);
|
||||
+ do_compare(inf, 1.f);
|
||||
+ do_compare(neg_inf, -1.f);
|
||||
+ do_compare(1.f / inf, -1.f / inf);
|
||||
return 0;
|
||||
}
|
||||
diff --git a/none/tests/s390x/bfp-4.stdout.exp b/none/tests/s390x/bfp-4.stdout.exp
|
||||
index eff136654..027b1587a 100644
|
||||
--- a/none/tests/s390x/bfp-4.stdout.exp
|
||||
+++ b/none/tests/s390x/bfp-4.stdout.exp
|
||||
@@ -1,6 +1,48 @@
|
||||
-cfebr: 3.140000 == 3.140000
|
||||
-cfebr: 3.140000 < 13.140000
|
||||
-cfebr: 3.140000 > -96.860001
|
||||
-cdebr: 2.780000 == 2.780000
|
||||
-cdebr: 2.780000 < 12.780000
|
||||
-cdebr: 2.780000 > -97.220001
|
||||
+cebr: 3.14 == 3.14
|
||||
+kebr: 3.14 == 3.14
|
||||
+cdbr: 3.14 == 3.14
|
||||
+kdbr: 3.14 == 3.14
|
||||
+cxbr: 3.14 == 3.14
|
||||
+kxbr: 3.14 == 3.14
|
||||
+cebr: -2.78 < 2.78
|
||||
+kebr: -2.78 < 2.78
|
||||
+cdbr: -2.78 < 2.78
|
||||
+kdbr: -2.78 < 2.78
|
||||
+cxbr: -2.78 < 2.78
|
||||
+kxbr: -2.78 < 2.78
|
||||
+cebr: inf == inf
|
||||
+kebr: inf == inf
|
||||
+cdbr: inf == inf
|
||||
+kdbr: inf == inf
|
||||
+cxbr: inf == inf
|
||||
+kxbr: inf == inf
|
||||
+cebr: inf > -inf
|
||||
+kebr: inf > -inf
|
||||
+cdbr: inf > -inf
|
||||
+kdbr: inf > -inf
|
||||
+cxbr: inf > -inf
|
||||
+kxbr: inf > -inf
|
||||
+cebr: -inf == -inf
|
||||
+kebr: -inf == -inf
|
||||
+cdbr: -inf == -inf
|
||||
+kdbr: -inf == -inf
|
||||
+cxbr: -inf == -inf
|
||||
+kxbr: -inf == -inf
|
||||
+cebr: inf > 1
|
||||
+kebr: inf > 1
|
||||
+cdbr: inf > 1
|
||||
+kdbr: inf > 1
|
||||
+cxbr: inf > 1
|
||||
+kxbr: inf > 1
|
||||
+cebr: -inf < -1
|
||||
+kebr: -inf < -1
|
||||
+cdbr: -inf < -1
|
||||
+kdbr: -inf < -1
|
||||
+cxbr: -inf < -1
|
||||
+kxbr: -inf < -1
|
||||
+cebr: 0 == -0
|
||||
+kebr: 0 == -0
|
||||
+cdbr: 0 == -0
|
||||
+kdbr: 0 == -0
|
||||
+cxbr: 0 == -0
|
||||
+kxbr: 0 == -0
|
||||
|
|
@ -1,194 +0,0 @@
|
|||
From bfa89eae00ba7067445bc0532e1f17405c062954 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Arnez <arnez@linux.ibm.com>
|
||||
Date: Thu, 23 May 2019 17:17:43 +0200
|
||||
Subject: [PATCH] Bug 407764 - s390x: drd fails on z13 due to function wrapping
|
||||
issue
|
||||
|
||||
The s390x-specific inline assembly macros for function wrapping in
|
||||
include/valgrind.h have a few issues.
|
||||
|
||||
When the compiler uses vector registers, such as with "-march=z13", all
|
||||
vector registers must be declared as clobbered by the callee. Because
|
||||
this is missing, many drd test failures are seen with "-march=z13".
|
||||
|
||||
Also, the inline assemblies write the return value into the target
|
||||
register before restoring r11. If r11 is used as the target register,
|
||||
this means that the restore operation corrupts the result. This bug
|
||||
causes failures with memcheck's "wrap6" test case.
|
||||
|
||||
These bugs are fixed. The clobber list is extended by the vector
|
||||
registers (if appropriate), and the target register is now written at the
|
||||
end, after restoring r11.
|
||||
---
|
||||
include/valgrind.h | 38 +++++++++++++++++++++++---------------
|
||||
1 file changed, 23 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/include/valgrind.h b/include/valgrind.h
|
||||
index f071bd392..815efa893 100644
|
||||
--- a/include/valgrind.h
|
||||
+++ b/include/valgrind.h
|
||||
@@ -4687,8 +4687,16 @@ typedef
|
||||
r14 in s390_irgen_noredir (VEX/priv/guest_s390_irgen.c) to give the
|
||||
function a proper return address. All others are ABI defined call
|
||||
clobbers. */
|
||||
-#define __CALLER_SAVED_REGS "0","1","2","3","4","5","14", \
|
||||
- "f0","f1","f2","f3","f4","f5","f6","f7"
|
||||
+#if defined(__VX__) || defined(__S390_VX__)
|
||||
+#define __CALLER_SAVED_REGS "0", "1", "2", "3", "4", "5", "14", \
|
||||
+ "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", \
|
||||
+ "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", \
|
||||
+ "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", \
|
||||
+ "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31"
|
||||
+#else
|
||||
+#define __CALLER_SAVED_REGS "0", "1", "2", "3", "4", "5", "14", \
|
||||
+ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7"
|
||||
+#endif
|
||||
|
||||
/* Nb: Although r11 is modified in the asm snippets below (inside
|
||||
VALGRIND_CFI_PROLOGUE) it is not listed in the clobber section, for
|
||||
@@ -4710,9 +4718,9 @@ typedef
|
||||
"aghi 15,-160\n\t" \
|
||||
"lg 1, 0(1)\n\t" /* target->r1 */ \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,160\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "d" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \
|
||||
@@ -4734,9 +4742,9 @@ typedef
|
||||
"lg 2, 8(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,160\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \
|
||||
@@ -4759,9 +4767,9 @@ typedef
|
||||
"lg 3,16(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,160\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \
|
||||
@@ -4786,9 +4794,9 @@ typedef
|
||||
"lg 4,24(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,160\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \
|
||||
@@ -4815,9 +4823,9 @@ typedef
|
||||
"lg 5,32(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,160\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7" \
|
||||
@@ -4846,9 +4854,9 @@ typedef
|
||||
"lg 6,40(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,160\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
|
||||
@@ -4880,9 +4888,9 @@ typedef
|
||||
"mvc 160(8,15), 48(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,168\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
|
||||
@@ -4916,9 +4924,9 @@ typedef
|
||||
"mvc 168(8,15), 56(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,176\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
|
||||
@@ -4954,9 +4962,9 @@ typedef
|
||||
"mvc 176(8,15), 64(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,184\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
|
||||
@@ -4994,9 +5002,9 @@ typedef
|
||||
"mvc 184(8,15), 72(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,192\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
|
||||
@@ -5036,9 +5044,9 @@ typedef
|
||||
"mvc 192(8,15), 80(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,200\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
|
||||
@@ -5080,9 +5088,9 @@ typedef
|
||||
"mvc 200(8,15), 88(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,208\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
|
||||
@@ -5126,9 +5134,9 @@ typedef
|
||||
"mvc 208(8,15), 96(1)\n\t" \
|
||||
"lg 1, 0(1)\n\t" \
|
||||
VALGRIND_CALL_NOREDIR_R1 \
|
||||
- "lgr %0, 2\n\t" \
|
||||
"aghi 15,216\n\t" \
|
||||
VALGRIND_CFI_EPILOGUE \
|
||||
+ "lgr %0, 2\n\t" \
|
||||
: /*out*/ "=d" (_res) \
|
||||
: /*in*/ "a" (&_argvec[0]) __FRAME_POINTER \
|
||||
: /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
commit 917e423073c5eacffbad83008c27c8e61e0e342a
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Mon May 20 00:09:59 2019 +0200
|
||||
|
||||
Make memcheck/tests/arm64-linux/scalar test work under root.
|
||||
|
||||
Running the testsuite as root isn't really recommended.
|
||||
But lets not make tests fail unnecessarily when running as root.
|
||||
Pass really invalid arguments to setuid, setgid, acct and fchown.
|
||||
Make setresgid, setresuid, setregid and setreuid always succeed.
|
||||
|
||||
diff --git a/memcheck/tests/arm64-linux/scalar.c b/memcheck/tests/arm64-linux/scalar.c
|
||||
index fd49db6..622ea1c 100644
|
||||
--- a/memcheck/tests/arm64-linux/scalar.c
|
||||
+++ b/memcheck/tests/arm64-linux/scalar.c
|
||||
@@ -136,7 +136,7 @@ int main(void)
|
||||
|
||||
// __NR_setuid 23
|
||||
GO(__NR_setuid, "1s 0m");
|
||||
- SY(__NR_setuid, x0); FAIL;
|
||||
+ SY(__NR_setuid, x0-1); FAIL;
|
||||
|
||||
// __NR_getuid 24
|
||||
GO(__NR_getuid, "0s 0m");
|
||||
@@ -229,7 +229,7 @@ int main(void)
|
||||
|
||||
// __NR_setgid 46
|
||||
GO(__NR_setgid, "1s 0m");
|
||||
- SY(__NR_setgid, x0); FAIL;
|
||||
+ SY(__NR_setgid, x0-1); FAIL;
|
||||
|
||||
// __NR_getgid 47
|
||||
GO(__NR_getgid, "0s 0m");
|
||||
@@ -249,7 +249,7 @@ int main(void)
|
||||
|
||||
// __NR_acct 51
|
||||
GO(__NR_acct, "1s 1m");
|
||||
- SY(__NR_acct, x0); FAIL;
|
||||
+ SY(__NR_acct, x0-1); FAIL;
|
||||
|
||||
// __NR_umount2 52
|
||||
GO(__NR_umount2, "2s 1m");
|
||||
@@ -340,11 +340,11 @@ int main(void)
|
||||
|
||||
// __NR_setreuid 70
|
||||
GO(__NR_setreuid, "2s 0m");
|
||||
- SY(__NR_setreuid, x0, x0); FAIL;
|
||||
+ SY(__NR_setreuid, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_setregid 71
|
||||
GO(__NR_setregid, "2s 0m");
|
||||
- SY(__NR_setregid, x0, x0); FAIL;
|
||||
+ SY(__NR_setregid, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_sigsuspend arm64 only has rt_sigsuspend
|
||||
// XXX: how do you use this function?
|
||||
@@ -447,7 +447,7 @@ int main(void)
|
||||
|
||||
// __NR_fchown 95
|
||||
GO(__NR_fchown, "3s 0m");
|
||||
- SY(__NR_fchown, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_fchown, x0-1, x0, x0); FAIL;
|
||||
|
||||
// __NR_getpriority 96
|
||||
GO(__NR_getpriority, "2s 0m");
|
||||
@@ -733,7 +733,7 @@ int main(void)
|
||||
|
||||
// __NR_setresuid 164
|
||||
GO(__NR_setresuid, "3s 0m");
|
||||
- SY(__NR_setresuid, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_setresuid, x0-1, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_getresuid 165
|
||||
GO(__NR_getresuid, "3s 3m");
|
||||
@@ -757,7 +757,7 @@ int main(void)
|
||||
|
||||
// __NR_setresgid 170
|
||||
GO(__NR_setresgid, "3s 0m");
|
||||
- SY(__NR_setresgid, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_setresgid, x0-1, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_getresgid 171
|
||||
GO(__NR_getresgid, "3s 3m");
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
commit abc09f23e1ad55a07beb827aef969acfe6c496ef
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Mon May 20 13:08:41 2019 +0200
|
||||
|
||||
Make memcheck/tests/x86-linux/scalar test work under root.
|
||||
|
||||
Running the testsuite as root isn't really recommended.
|
||||
But lets not make tests fail unnecessarily when running as root.
|
||||
Similar to the arm64-linux/scalar fixes. Plus 32bit variants that
|
||||
don't exist on arm64.
|
||||
|
||||
Pass really invalid arguments to setuid[32], setgid[32], acct, fchown[32].
|
||||
Make setresgid[32], setresuid[32], setregid[32], setreuid[32] always succeed.
|
||||
|
||||
diff --git a/memcheck/tests/x86-linux/scalar.c b/memcheck/tests/x86-linux/scalar.c
|
||||
index 213a5ad..52f0d4e 100644
|
||||
--- a/memcheck/tests/x86-linux/scalar.c
|
||||
+++ b/memcheck/tests/x86-linux/scalar.c
|
||||
@@ -145,7 +145,7 @@ int main(void)
|
||||
|
||||
// __NR_setuid 23
|
||||
GO(__NR_setuid, "1s 0m");
|
||||
- SY(__NR_setuid, x0); FAIL;
|
||||
+ SY(__NR_setuid, x0-1); FAIL;
|
||||
|
||||
// __NR_getuid 24
|
||||
GO(__NR_getuid, "0s 0m");
|
||||
@@ -238,7 +238,7 @@ int main(void)
|
||||
|
||||
// __NR_setgid 46
|
||||
GO(__NR_setgid, "1s 0m");
|
||||
- SY(__NR_setgid, x0); FAIL;
|
||||
+ SY(__NR_setgid, x0-1); FAIL;
|
||||
|
||||
// __NR_getgid 47
|
||||
GO(__NR_getgid, "0s 0m");
|
||||
@@ -258,7 +258,7 @@ int main(void)
|
||||
|
||||
// __NR_acct 51
|
||||
GO(__NR_acct, "1s 1m");
|
||||
- SY(__NR_acct, x0); FAIL;
|
||||
+ SY(__NR_acct, x0-1); FAIL;
|
||||
|
||||
// __NR_umount2 52
|
||||
GO(__NR_umount2, "2s 1m");
|
||||
@@ -349,11 +349,11 @@ int main(void)
|
||||
|
||||
// __NR_setreuid 70
|
||||
GO(__NR_setreuid, "2s 0m");
|
||||
- SY(__NR_setreuid, x0, x0); FAIL;
|
||||
+ SY(__NR_setreuid, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_setregid 71
|
||||
GO(__NR_setregid, "2s 0m");
|
||||
- SY(__NR_setregid, x0, x0); FAIL;
|
||||
+ SY(__NR_setregid, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_sigsuspend 72
|
||||
// XXX: how do you use this function?
|
||||
@@ -456,7 +456,7 @@ int main(void)
|
||||
|
||||
// __NR_fchown 95
|
||||
GO(__NR_fchown, "3s 0m");
|
||||
- SY(__NR_fchown, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_fchown, x0-1, x0, x0); FAIL;
|
||||
|
||||
// __NR_getpriority 96
|
||||
GO(__NR_getpriority, "2s 0m");
|
||||
@@ -742,7 +742,7 @@ int main(void)
|
||||
|
||||
// __NR_setresuid 164
|
||||
GO(__NR_setresuid, "3s 0m");
|
||||
- SY(__NR_setresuid, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_setresuid, x0-1, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_getresuid 165
|
||||
GO(__NR_getresuid, "3s 3m");
|
||||
@@ -766,7 +766,7 @@ int main(void)
|
||||
|
||||
// __NR_setresgid 170
|
||||
GO(__NR_setresgid, "3s 0m");
|
||||
- SY(__NR_setresgid, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_setresgid, x0-1, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_getresgid 171
|
||||
GO(__NR_getresgid, "3s 3m");
|
||||
@@ -923,11 +923,11 @@ int main(void)
|
||||
|
||||
// __NR_setreuid32 203
|
||||
GO(__NR_setreuid32, "2s 0m");
|
||||
- SY(__NR_setreuid32, x0, x0); FAIL;
|
||||
+ SY(__NR_setreuid32, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_setregid32 204
|
||||
GO(__NR_setregid32, "2s 0m");
|
||||
- SY(__NR_setregid32, x0, x0); FAIL;
|
||||
+ SY(__NR_setregid32, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_getgroups32 205
|
||||
GO(__NR_getgroups32, "2s 1m");
|
||||
@@ -939,11 +939,11 @@ int main(void)
|
||||
|
||||
// __NR_fchown32 207
|
||||
GO(__NR_fchown32, "3s 0m");
|
||||
- SY(__NR_fchown32, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_fchown32, x0-1, x0, x0); FAIL;
|
||||
|
||||
// __NR_setresuid32 208
|
||||
GO(__NR_setresuid32, "3s 0m");
|
||||
- SY(__NR_setresuid32, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_setresuid32, x0-1, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_getresuid32 209
|
||||
GO(__NR_getresuid32, "3s 3m");
|
||||
@@ -951,7 +951,7 @@ int main(void)
|
||||
|
||||
// __NR_setresgid32 210
|
||||
GO(__NR_setresgid32, "3s 0m");
|
||||
- SY(__NR_setresgid32, x0, x0, x0); FAIL;
|
||||
+ SY(__NR_setresgid32, x0-1, x0-1, x0-1); SUCC;
|
||||
|
||||
// __NR_getresgid32 211
|
||||
GO(__NR_getresgid32, "3s 3m");
|
||||
@@ -963,11 +963,11 @@ int main(void)
|
||||
|
||||
// __NR_setuid32 213
|
||||
GO(__NR_setuid32, "1s 0m");
|
||||
- SY(__NR_setuid32, x0); FAIL;
|
||||
+ SY(__NR_setuid32, x0-1); FAIL;
|
||||
|
||||
// __NR_setgid32 214
|
||||
GO(__NR_setgid32, "1s 0m");
|
||||
- SY(__NR_setgid32, x0); FAIL;
|
||||
+ SY(__NR_setgid32, x0-1); FAIL;
|
||||
|
||||
// __NR_setfsuid32 215
|
||||
GO(__NR_setfsuid32, "1s 0m");
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,126 +0,0 @@
|
|||
commit 3a2711c659ac839934f13e0529e14d6c15325383
|
||||
Author: Andreas Arnez <arnez@linux.ibm.com>
|
||||
Date: Thu Feb 27 15:52:53 2020 +0100
|
||||
|
||||
s390x: Add CPU model for z15
|
||||
|
||||
Make the z15 CPU models known to Valgrind. Add test case output for z15
|
||||
to the "ecag" test. Also ensure that the facility bits for CPU facilities
|
||||
unsupported by Valgrind are unset, particularly for the new
|
||||
deflate-conversion facility.
|
||||
|
||||
diff --git a/VEX/priv/guest_s390_helpers.c b/VEX/priv/guest_s390_helpers.c
|
||||
index 525e7000c..a470d9f8d 100644
|
||||
--- a/VEX/priv/guest_s390_helpers.c
|
||||
+++ b/VEX/priv/guest_s390_helpers.c
|
||||
@@ -377,6 +377,9 @@ s390x_dirtyhelper_STFLE(VexGuestS390XState *guest_state, ULong *addr)
|
||||
s390_set_facility_bit(addr, S390_FAC_CTREXE, 0);
|
||||
s390_set_facility_bit(addr, S390_FAC_TREXE, 0);
|
||||
s390_set_facility_bit(addr, S390_FAC_MSA4, 0);
|
||||
+ s390_set_facility_bit(addr, S390_FAC_VXE, 0);
|
||||
+ s390_set_facility_bit(addr, S390_FAC_VXE2, 0);
|
||||
+ s390_set_facility_bit(addr, S390_FAC_DFLT, 0);
|
||||
|
||||
return cc;
|
||||
}
|
||||
diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h
|
||||
index 359d10809..6da26dcb5 100644
|
||||
--- a/VEX/pub/libvex.h
|
||||
+++ b/VEX/pub/libvex.h
|
||||
@@ -147,7 +147,8 @@ typedef
|
||||
#define VEX_S390X_MODEL_Z13S 13
|
||||
#define VEX_S390X_MODEL_Z14 14
|
||||
#define VEX_S390X_MODEL_Z14_ZR1 15
|
||||
-#define VEX_S390X_MODEL_UNKNOWN 16 /* always last in list */
|
||||
+#define VEX_S390X_MODEL_Z15 16
|
||||
+#define VEX_S390X_MODEL_UNKNOWN 17 /* always last in list */
|
||||
#define VEX_S390X_MODEL_MASK 0x3F
|
||||
|
||||
#define VEX_HWCAPS_S390X_LDISP (1<<6) /* Long-displacement facility */
|
||||
diff --git a/VEX/pub/libvex_s390x_common.h b/VEX/pub/libvex_s390x_common.h
|
||||
index d945a4472..289421677 100644
|
||||
--- a/VEX/pub/libvex_s390x_common.h
|
||||
+++ b/VEX/pub/libvex_s390x_common.h
|
||||
@@ -103,6 +103,9 @@
|
||||
#define S390_FAC_TREXE 73 // transactional execution
|
||||
#define S390_FAC_MSA4 77 // message-security-assist 4
|
||||
#define S390_FAC_VX 129 // vector facility
|
||||
+#define S390_FAC_VXE 135 // vector enhancements facility 1
|
||||
+#define S390_FAC_VXE2 148 // vector enhancements facility 2
|
||||
+#define S390_FAC_DFLT 151 // deflate-conversion facility
|
||||
|
||||
|
||||
/*--------------------------------------------------------------*/
|
||||
diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c
|
||||
index 672a02124..0fd1d21c7 100644
|
||||
--- a/coregrind/m_machine.c
|
||||
+++ b/coregrind/m_machine.c
|
||||
@@ -581,6 +581,8 @@ static UInt VG_(get_machine_model)(void)
|
||||
{ "2965", VEX_S390X_MODEL_Z13S },
|
||||
{ "3906", VEX_S390X_MODEL_Z14 },
|
||||
{ "3907", VEX_S390X_MODEL_Z14_ZR1 },
|
||||
+ { "8561", VEX_S390X_MODEL_Z15 },
|
||||
+ { "8562", VEX_S390X_MODEL_Z15 },
|
||||
};
|
||||
|
||||
Int model, n, fh;
|
||||
diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am
|
||||
index c5b07f7a2..a0fb92ef5 100644
|
||||
--- a/none/tests/s390x/Makefile.am
|
||||
+++ b/none/tests/s390x/Makefile.am
|
||||
@@ -39,7 +39,7 @@ EXTRA_DIST = \
|
||||
$(addsuffix .stdout.exp,$(INSN_TESTS)) \
|
||||
$(addsuffix .vgtest,$(INSN_TESTS)) \
|
||||
ecag.stdout.exp-z10ec ecag.stdout.exp-z196 ecag.stdout.exp-zec12 \
|
||||
- ecag.stdout.exp-z13 ecag.stdout.exp-z14 \
|
||||
+ ecag.stdout.exp-z13 ecag.stdout.exp-z14 ecag.stdout.exp-z15 \
|
||||
op00.stderr.exp1 op00.stderr.exp2 op00.vgtest \
|
||||
fixbr.vgtest fixbr.stderr.exp fixbr.stdout.exp \
|
||||
fpext.vgtest fpext.stderr.exp fpext.stdout.exp \
|
||||
diff --git a/none/tests/s390x/ecag.stdout.exp-z15 b/none/tests/s390x/ecag.stdout.exp-z15
|
||||
new file mode 100644
|
||||
index 000000000..b98d81b78
|
||||
--- /dev/null
|
||||
+++ b/none/tests/s390x/ecag.stdout.exp-z15
|
||||
@@ -0,0 +1,28 @@
|
||||
+L1 topology: separate data and instruction; private
|
||||
+L1 cache line size data: 256
|
||||
+L1 cache line size insn: 256
|
||||
+L1 total cachesize data: 131072
|
||||
+L1 total cachesize insn: 131072
|
||||
+L1 set. assoc. data: 8
|
||||
+L1 set. assoc. insn: 8
|
||||
+L2 topology: separate data and instruction; private
|
||||
+L2 cache line size data: 256
|
||||
+L2 cache line size insn: 256
|
||||
+L2 total cachesize data: 4194304
|
||||
+L2 total cachesize insn: 4194304
|
||||
+L2 set. assoc. data: 8
|
||||
+L2 set. assoc. insn: 8
|
||||
+L3 topology: unified data and instruction; shared
|
||||
+L3 cache line size data: 256
|
||||
+L3 cache line size insn: 256
|
||||
+L3 total cachesize data: 268435456
|
||||
+L3 total cachesize insn: 268435456
|
||||
+L3 set. assoc. data: 32
|
||||
+L3 set. assoc. insn: 32
|
||||
+L4 topology: unified data and instruction; shared
|
||||
+L4 cache line size data: 256
|
||||
+L4 cache line size insn: 256
|
||||
+L4 total cachesize data: 1006632960
|
||||
+L4 total cachesize insn: 1006632960
|
||||
+L4 set. assoc. data: 60
|
||||
+L4 set. assoc. insn: 60
|
||||
diff --git a/tests/s390x_features.c b/tests/s390x_features.c
|
||||
index baa349311..25b98f3a3 100644
|
||||
--- a/tests/s390x_features.c
|
||||
+++ b/tests/s390x_features.c
|
||||
@@ -116,6 +116,8 @@ model_info models[] = {
|
||||
{ "2965", "z13s" },
|
||||
{ "3906", "z14" },
|
||||
{ "3907", "z14 ZR1"},
|
||||
+ { "8561", "z15" },
|
||||
+ { "8562", "z15" },
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1,69 +1,50 @@
|
|||
commit d3c977726064ba09fed6dfc7daf22b16824c97b4
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Fri May 24 18:24:56 2019 +0200
|
||||
|
||||
Add -Wl,-z,now to some binaries.
|
||||
|
||||
diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
|
||||
index 1b7842b..e211eec 100644
|
||||
index 2b8703cf1a63..8cb828b85c57 100644
|
||||
--- a/auxprogs/Makefile.am
|
||||
+++ b/auxprogs/Makefile.am
|
||||
@@ -32,7 +32,7 @@ valgrind_listener_SOURCES = valgrind-listener.c
|
||||
@@ -50,7 +50,7 @@ valgrind_listener_SOURCES = valgrind-listener.c
|
||||
valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fhosted -fstack-protector-strong
|
||||
valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI) -Wl,-z,now
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
valgrind_listener_CFLAGS += -static
|
||||
endif
|
||||
@@ -51,7 +51,7 @@ valgrind_di_server_SOURCES = valgrind-di-server.c
|
||||
@@ -69,7 +69,7 @@ valgrind_di_server_SOURCES = valgrind-di-server.c
|
||||
valgrind_di_server_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fhosted -fstack-protector-strong
|
||||
valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI) -Wl,-z,now
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
valgrind_di_server_CFLAGS += -static
|
||||
endif
|
||||
@@ -86,7 +86,7 @@ getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
@@ -104,7 +104,7 @@ getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fhosted -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
if HAVE_DLINFO_RTLD_DI_TLS_MODID
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = $(LDADD) -ldl
|
||||
endif
|
||||
diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am
|
||||
index f572741..1c07e50 100644
|
||||
--- a/cachegrind/Makefile.am
|
||||
+++ b/cachegrind/Makefile.am
|
||||
@@ -27,7 +27,7 @@ cg_merge_SOURCES = cg_merge.c
|
||||
cg_merge_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
cg_merge_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
cg_merge_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-cg_merge_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
+cg_merge_LDFLAGS = $(AM_CFLAGS_PRI) -Wl,-z,now
|
||||
# If there is no secondary platform, and the platforms include x86-darwin,
|
||||
# then the primary platform must be x86-darwin. Hence:
|
||||
if ! VGCONF_HAVE_PLATFORM_SEC
|
||||
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
||||
index 3c73210..fb6b7bb 100644
|
||||
index 0bcb4a4f423f..59fc48052e50 100644
|
||||
--- a/coregrind/Makefile.am
|
||||
+++ b/coregrind/Makefile.am
|
||||
@@ -57,7 +57,7 @@ RANLIB = ${LTO_RANLIB}
|
||||
@@ -64,7 +64,7 @@ RANLIB = ${LTO_RANLIB}
|
||||
valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted -fstack-protector-strong
|
||||
valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
# If there is no secondary platform, and the platforms include x86-darwin,
|
||||
# then the primary platform must be x86-darwin. Hence:
|
||||
if ! VGCONF_HAVE_PLATFORM_SEC
|
||||
@@ -96,7 +96,7 @@ endif
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
@@ -106,7 +106,7 @@ endif
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI) $(GDB_SCRIPTS_DIR)
|
||||
vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted -fstack-protector-strong
|
||||
vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
-vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
+vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@ -Wl,-z,now
|
||||
|
|
@ -1,59 +1,49 @@
|
|||
commit b73fb7a614e1b5d60af23fb0752b5cead995e02e
|
||||
Author: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sun Apr 14 00:30:05 2019 +0200
|
||||
|
||||
Remove no-stack-protector, add stack-protector-strong to some.
|
||||
|
||||
diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
|
||||
index 56cc5ef..1b7842b 100644
|
||||
index d96e7fd0a968..2b8703cf1a63 100644
|
||||
--- a/auxprogs/Makefile.am
|
||||
+++ b/auxprogs/Makefile.am
|
||||
@@ -30,7 +30,7 @@ bin_PROGRAMS = valgrind-listener valgrind-di-server
|
||||
@@ -48,7 +48,7 @@ bin_PROGRAMS = valgrind-listener valgrind-di-server
|
||||
|
||||
valgrind_listener_SOURCES = valgrind-listener.c
|
||||
valgrind_listener_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
-valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
-valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fhosted
|
||||
+valgrind_listener_CFLAGS = $(AM_CFLAGS_PRI) -fhosted -fstack-protector-strong
|
||||
valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_listener_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
@@ -49,7 +49,7 @@ endif
|
||||
@@ -67,7 +67,7 @@ endif
|
||||
|
||||
valgrind_di_server_SOURCES = valgrind-di-server.c
|
||||
valgrind_di_server_CPPFLAGS = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
|
||||
-valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI)
|
||||
+valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
-valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fhosted
|
||||
+valgrind_di_server_CFLAGS = $(AM_CFLAGS_PRI) -fhosted -fstack-protector-strong
|
||||
valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_di_server_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
@@ -84,7 +84,7 @@ endif
|
||||
@@ -102,7 +102,7 @@ endif
|
||||
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fstack-protector-strong
|
||||
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fhosted
|
||||
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fhosted -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
if HAVE_DLINFO_RTLD_DI_TLS_MODID
|
||||
diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am
|
||||
index f8447a1..f572741 100644
|
||||
--- a/cachegrind/Makefile.am
|
||||
+++ b/cachegrind/Makefile.am
|
||||
@@ -25,7 +25,7 @@ bin_PROGRAMS = cg_merge
|
||||
|
||||
cg_merge_SOURCES = cg_merge.c
|
||||
cg_merge_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
-cg_merge_CFLAGS = $(AM_CFLAGS_PRI)
|
||||
+cg_merge_CFLAGS = $(AM_CFLAGS_PRI) -fstack-protector-strong
|
||||
cg_merge_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
cg_merge_LDFLAGS = $(AM_CFLAGS_PRI)
|
||||
# If there is no secondary platform, and the platforms include x86-darwin,
|
||||
@@ -119,7 +119,7 @@ endif
|
||||
if VGCONF_HAVE_PLATFORM_SEC
|
||||
getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = getoff.c
|
||||
getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
-getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -fhosted
|
||||
+getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = $(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -fhosted -fstack-protector-strong
|
||||
getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_SEC)
|
||||
getoff_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = $(AM_CFLAGS_SEC)
|
||||
if HAVE_DLINFO_RTLD_DI_TLS_MODID
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f8c798b..ccc8f52 100755
|
||||
index 90fafaf1c557..84a3d22c5bff 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2188,24 +2188,24 @@ AC_LANG(C)
|
||||
AC_SUBST(FLAG_FALIGNED_NEW)
|
||||
@@ -3004,24 +3004,24 @@
|
||||
fi
|
||||
|
||||
# does this compiler support -fno-stack-protector ?
|
||||
-AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
|
||||
|
|
@ -95,24 +85,24 @@ index f8c798b..ccc8f52 100755
|
|||
|
||||
# does this compiler support -finline-functions ?
|
||||
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
|
||||
index 94030fd..3c73210 100644
|
||||
index 4ead1542b0c7..0bcb4a4f423f 100644
|
||||
--- a/coregrind/Makefile.am
|
||||
+++ b/coregrind/Makefile.am
|
||||
@@ -55,7 +55,7 @@ AR = ${LTO_AR}
|
||||
@@ -62,7 +62,7 @@ AR = ${LTO_AR}
|
||||
RANLIB = ${LTO_RANLIB}
|
||||
|
||||
valgrind_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
-valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
|
||||
+valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
-valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted
|
||||
+valgrind_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted -fstack-protector-strong
|
||||
valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
valgrind_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
# If there is no secondary platform, and the platforms include x86-darwin,
|
||||
@@ -94,7 +94,7 @@ vgdb_SOURCES += vgdb-invoker-solaris.c
|
||||
@@ -104,7 +104,7 @@ vgdb_SOURCES += vgdb-invoker-freebsd.c
|
||||
endif
|
||||
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI)
|
||||
-vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
|
||||
+vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
|
||||
vgdb_CPPFLAGS = $(AM_CPPFLAGS_PRI) $(GDB_SCRIPTS_DIR)
|
||||
-vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted
|
||||
+vgdb_CFLAGS = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fhosted -fstack-protector-strong
|
||||
vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
|
||||
vgdb_LDFLAGS = $(AM_CFLAGS_PRI) @LIB_UBSAN@
|
||||
if VGCONF_PLATVARIANT_IS_ANDROID
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--- valgrind/glibc-2.34567-NPTL-helgrind.supp.jj 2009-08-19 15:37:48.000000000 +0200
|
||||
+++ valgrind/glibc-2.34567-NPTL-helgrind.supp 2009-10-21 16:46:31.000000000 +0200
|
||||
@@ -88,6 +88,12 @@
|
||||
obj:*/lib*/libpthread-2.*so*
|
||||
}
|
||||
{
|
||||
+ helgrind-glibc2X-102a
|
||||
+ Helgrind:Race
|
||||
+ fun:mythread_wrapper
|
||||
+ obj:*vgpreload_helgrind*.so
|
||||
+}
|
||||
+{
|
||||
helgrind-glibc2X-103
|
||||
Helgrind:Race
|
||||
fun:pthread_cond_*@@GLIBC_2.*
|
||||
822
valgrind.spec
822
valgrind.spec
|
|
@ -1,14 +1,19 @@
|
|||
%{?scl:%scl_package valgrind}
|
||||
|
||||
Summary: Tool for finding memory management bugs in programs
|
||||
Summary: Dynamic analysis tools to detect memory or thread bugs and profile
|
||||
Name: %{?scl_prefix}valgrind
|
||||
Version: 3.15.0
|
||||
Release: 20%{?dist}
|
||||
Version: 3.27.1
|
||||
Release: 2%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
URL: http://www.valgrind.org/
|
||||
|
||||
# Only necessary for RHEL, will be ignored on Fedora
|
||||
# This ignores licenses that are only found in the test or perf sources
|
||||
# we only care about those license statements found in sources that end
|
||||
# up in the binary packages. One piece of code for which we don't have
|
||||
# a license specifier is in coregrind/m_main.c for some Hacker's Delight
|
||||
# public domain code, which is only compiled into Darwin binaries, which
|
||||
# we don't create. Also some subpackages have their own license tags.
|
||||
License: GPL-3.0-or-later AND bzip2-1.0.6 AND (GPL-3.0-or-later AND LGPL-2.0-or-later) AND (GPL-3.0-or-later AND ISC) AND (GPL-3.0-or-later AND Unlicense) AND (GPL-3.0-or-later AND Zlib) AND (GPL-3.0-or-later WITH GCC-exception-2.0) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-3.0-or-later AND BSD-3-Clause) AND (GPL-3.0-or-later AND (MIT OR NCSA)) AND CMU-Mach AND (GPL-3.0-or-later AND X11 AND BSD-3-Clause) AND X11 AND (GPL-3.0-or-later AND LGPL-2.0-or-later) AND (GPL-2.0-or-later WITH Autoconf-exception-generic) AND (GPL-3.0-or-later WITH Autoconf-exception-generic-3.0) AND FSFULLR AND FSFAP AND FSFUL AND FSFULLRWD
|
||||
URL: https://www.valgrind.org/
|
||||
|
||||
# Are we building for a Software Collection?
|
||||
%{?scl:%global is_scl 1}
|
||||
|
|
@ -16,22 +21,23 @@ URL: http://www.valgrind.org/
|
|||
|
||||
# We never want the openmpi subpackage when building a software collecton.
|
||||
# We always want it for fedora.
|
||||
# We only want it for older rhel. But not s390x for too old rhel.
|
||||
# We only want it for older rhel.
|
||||
# And on fedora > 39 i386 dropped openmpi.
|
||||
%if %{is_scl}
|
||||
%global build_openmpi 0
|
||||
%else
|
||||
%if 0%{?fedora}
|
||||
%global build_openmpi 1
|
||||
%ifarch %{ix86}
|
||||
%global build_openmpi (%{?fedora} < 40)
|
||||
%else
|
||||
%global build_openmpi 1
|
||||
%endif
|
||||
%endif
|
||||
%if 0%{?rhel}
|
||||
%if 0%{?rhel} > 7
|
||||
%global build_openmpi 0
|
||||
%else
|
||||
%ifarch s390x
|
||||
%global build_openmpi (%{?rhel} > 6)
|
||||
%else
|
||||
%global build_openmpi 1
|
||||
%endif
|
||||
%global build_openmpi 1
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
|
@ -51,17 +57,11 @@ URL: http://www.valgrind.org/
|
|||
# Whether to run the full regtest or only a limited set
|
||||
# The full regtest includes gdb_server integration tests
|
||||
# and experimental tools.
|
||||
# Only run full regtests on fedora, but not on older rhel
|
||||
# or when creating scl, the gdb_server tests might hang.
|
||||
# Don't run them when creating scl, the gdb_server tests might hang.
|
||||
%if %{is_scl}
|
||||
%global run_full_regtest 0
|
||||
%else
|
||||
%if 0%{?fedora}
|
||||
%global run_full_regtest 1
|
||||
%endif
|
||||
%if 0%{?rhel}
|
||||
%global run_full_regtest (%rhel >= 7)
|
||||
%endif
|
||||
%global run_full_regtest 1
|
||||
%endif
|
||||
|
||||
# Generating minisymtabs doesn't really work for the staticly linked
|
||||
|
|
@ -71,109 +71,21 @@ URL: http://www.valgrind.org/
|
|||
# So those will already have their full symbol table.
|
||||
%undefine _include_minidebuginfo
|
||||
|
||||
Source0: ftp://sourceware.org/pub/valgrind/valgrind-%{version}.tar.bz2
|
||||
Source0: https://sourceware.org/pub/valgrind/valgrind-%{version}.tar.bz2
|
||||
|
||||
# Needs investigation and pushing upstream
|
||||
Patch1: valgrind-3.9.0-cachegrind-improvements.patch
|
||||
|
||||
# KDE#211352 - helgrind races in helgrind's own mythread_wrapper
|
||||
Patch2: valgrind-3.9.0-helgrind-race-supp.patch
|
||||
|
||||
# Make ld.so supressions slightly less specific.
|
||||
Patch3: valgrind-3.9.0-ldso-supp.patch
|
||||
|
||||
# We want all executables and libraries in libexec instead of lib
|
||||
# so they are only available for valgrind usage itself and so the
|
||||
# same directory is used independent of arch.
|
||||
Patch4: valgrind-3.15.0-pkglibexecdir.patch
|
||||
|
||||
# KDE#398649 s390x z13 support doesn't build with older gcc/binutils
|
||||
# Disable z13 support (on rhel6)
|
||||
Patch5: valgrind-3.15.0-disable-s390x-z13.patch
|
||||
Patch2: valgrind-3.9.0-ldso-supp.patch
|
||||
|
||||
# Add some stack-protector
|
||||
Patch6: valgrind-3.15.0-some-stack-protector.patch
|
||||
|
||||
# KDE#406561 mcinfcallWSRU gdbserver_test fails on ppc64
|
||||
Patch7: valgrind-3.15.0-ppc64-filter_gdb.patch
|
||||
|
||||
# KDE#407218 Add support for the copy_file_range syscall
|
||||
Patch8: valgrind-3.15.0-copy_file_range.patch
|
||||
|
||||
# KDE#407307 Intercept stpcpy also in ld.so for arm64
|
||||
Patch9: valgrind-3.15.0-arm64-ld-stpcpy.patch
|
||||
|
||||
# commit 59784c aarch64 (arm64) isn't a supported architecture for exp-sgcheck.
|
||||
Patch10: valgrind-3.15.0-exp-sgcheck-no-aarch64.patch
|
||||
|
||||
# commit 917e42 Make memcheck/tests/arm64-linux/scalar work under root
|
||||
Patch11: valgrind-3.15.0-scalar-arm64.patch
|
||||
|
||||
# commit abc09f Make memcheck/tests/x86-linux/scalar test work under root.
|
||||
Patch12: valgrind-3.15.0-scalar-x86.patch
|
||||
|
||||
# KDE#407764 s390x: drd fails on z13 due to function wrapping issue
|
||||
Patch13: valgrind-3.15.0-s390x-wrap-drd.patch
|
||||
Patch3: valgrind-3.26.0-some-stack-protector.patch
|
||||
|
||||
# Add some -Wl,z,now.
|
||||
Patch14: valgrind-3.15.0-some-Wl-z-now.patch
|
||||
|
||||
# KDE#408009 Expose rdrand and f16c even on avx if host cpu supports them
|
||||
Patch15: valgrind-3.15.0-avx-rdrand-f16c.patch
|
||||
|
||||
# KDE#408091 Missing pkey syscalls
|
||||
Patch16: valgrind-3.15.0-pkey.patch
|
||||
|
||||
# KDE#408414 Add support for preadv2 and pwritev2 syscalls
|
||||
Patch17: valgrind-3.15.0-preadv2-pwritev2.patch
|
||||
|
||||
# Upstream commit 9616e9bc9a1950f70ab1abd1c6ca9abc3f26eb7f
|
||||
Patch18: valgrind-3.15.0-arm-membarrier.patch
|
||||
|
||||
# KDE#404406 s390x: z14 miscellaneous instructions not implemented
|
||||
Patch19: valgrind-3.15.0-z14-misc.patch
|
||||
|
||||
# KDE#405201 Incorrect size of struct vki_siginfo on 64-bit Linux architectures
|
||||
Patch20: valgrind-3.15.0-ptrace-siginfo.patch
|
||||
|
||||
# RHBZ#1794482 guest_s390_defs.h:291: multiple definition of `s390x_vec_op_t'
|
||||
Patch21: valgrind-3.15.0-gcc-10-typedef-enum.patch
|
||||
|
||||
# GCC10 build error bad asm on i686
|
||||
# Upstream commit 2dab3249867615055a680cad7fccb22411587579
|
||||
Patch22: valgrind-3.15.0-gcc-10-i686-asm-test.patch
|
||||
|
||||
# KDE#416667 gcc10 ppc64le impossible constraint in 'asm' in test_isa
|
||||
Patch23: valgrind-3.15.0-gcc10-ppc64-asm-constraints.patch
|
||||
|
||||
# KDE#416301 s390x: "compare and signal" not supported
|
||||
Patch24: valgrind-3.15.0-s390x-compare-and-signal.patch
|
||||
|
||||
# KDE#417452 s390_insn_store_emit: dst->tag for HRcVec128
|
||||
Patch25: valgrind-3.15.0-s390x-HRcVec128.patch
|
||||
|
||||
# KDE#417578 - Add suppressions for glibc DTV leaks
|
||||
Patch26: valgrind-3.15.0-glibc-dtv-supp.patch
|
||||
|
||||
# KDE#416760 Assertion 'VG_IS_16_ALIGNED(sizeof(struct rt_sigframe))' failed
|
||||
# KDE#417427 commit to fix vki_siginfo_t definition created errors on PPC64
|
||||
Patch27: valgrind-3.15.0-ppc64-sigframe.patch
|
||||
|
||||
# KDE#416753 new 32bit time syscalls for 2038+
|
||||
Patch28: valgrind-3.15.0-time64.patch
|
||||
|
||||
# Upstream commit 2d040ce2c7fd328b4e8b0c2363ebe0c2ea2cbc9f
|
||||
Patch29: valgrind-3.15.0-arm-preadv2-pwritev2.patch
|
||||
|
||||
# Upstream commit ce094ba912b1fb1539242e4d6b2a76c513a3d132
|
||||
Patch30: valgrind-3.15.0-avx_estimate_insn-test.patch
|
||||
|
||||
# Upstream commit fe6805efc1b6db0cfa5f1cd5fb1854775cbfa31a
|
||||
Patch31: valgrind-3.15.0-gcc-10-x86-amd64-asm-test.patch
|
||||
|
||||
# Upstream commit 3a2711c659ac839934f13e0529e14d6c15325383
|
||||
Patch32: valgrind-3.15.0-z15.patch
|
||||
Patch4: valgrind-3.26.0-some-Wl-z-now.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: glibc-devel
|
||||
|
||||
%if %{build_openmpi}
|
||||
|
|
@ -200,19 +112,32 @@ BuildRequires: perl(Getopt::Long)
|
|||
BuildRequires: automake
|
||||
BuildRequires: autoconf
|
||||
|
||||
%{?scl:Requires:%scl_runtime}
|
||||
# For make check validating the documentation
|
||||
BuildRequires: docbook-dtds
|
||||
|
||||
# We need to fixup selinux file context when doing a scl build.
|
||||
# In RHEL6 we might need to fix up the labels even though the
|
||||
# meta package sets up a fs equivalence. See post.
|
||||
%if 0%{?rhel} == 6
|
||||
%{?scl:Requires(post): /sbin/restorecon}
|
||||
# For testing debuginfod-find
|
||||
%if 0%{?fedora} > 29 || 0%{?rhel} > 7
|
||||
BuildRequires: elfutils-debuginfod
|
||||
BuildRequires: elfutils-debuginfod-client
|
||||
# For using debuginfod at runtime
|
||||
Recommends: elfutils-debuginfod-client
|
||||
%endif
|
||||
|
||||
# Optional subpackages
|
||||
Recommends: %{?scl_prefix}valgrind-docs = %{epoch}:%{version}-%{release}
|
||||
Recommends: %{?scl_prefix}valgrind-scripts = %{epoch}:%{version}-%{release}
|
||||
Recommends: %{?scl_prefix}valgrind-gdb = %{epoch}:%{version}-%{release}
|
||||
|
||||
# For running the testsuite.
|
||||
# Some of the python scripts require python 3.9+
|
||||
BuildRequires: python3-devel
|
||||
|
||||
%{?scl:Requires:%scl_runtime}
|
||||
|
||||
# We could use %%valgrind_arches as defined in redhat-rpm-config
|
||||
# But that is really for programs using valgrind, it defines the
|
||||
# set of architectures that valgrind works correctly on.
|
||||
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
|
||||
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64 riscv64
|
||||
|
||||
# Define valarch, the architecture name that valgrind uses
|
||||
# And only_arch, the configure option to only build for that arch.
|
||||
|
|
@ -248,6 +173,10 @@ ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
|
|||
%define valarch arm64
|
||||
%define only_arch --enable-only64bit
|
||||
%endif
|
||||
%ifarch riscv64
|
||||
%define valarch riscv64
|
||||
%define only_arch --enable-only64bit
|
||||
%endif
|
||||
|
||||
%description
|
||||
Valgrind is an instrumentation framework for building dynamic analysis
|
||||
|
|
@ -262,11 +191,48 @@ profiler (callgrind), and a heap profiler (massif).
|
|||
|
||||
%package devel
|
||||
Summary: Development files for valgrind aware programs
|
||||
Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
|
||||
# This is really Hybrid-BSD
|
||||
# https://fedoraproject.org/wiki/Licensing:BSD#Hybrid_BSD_(half_BSD,_half_zlib)
|
||||
# But that doesnt have a SPDX identifier yet
|
||||
# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/422
|
||||
License: bzip2-1.0.6
|
||||
# These are just the header files, so strictly speaking you don't
|
||||
# need valgrind itself unless you are testing your builds. This used
|
||||
# to be a Requires, so people might depend on the package pulling in
|
||||
# the core valgrind package, so make it at least a weak dependency.
|
||||
Recommends: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Header files and libraries for development of valgrind aware programs.
|
||||
|
||||
%package docs
|
||||
Summary: Documentation for valgrind tools, scripts and gdb integration
|
||||
License: GFDL-1.2-or-later
|
||||
|
||||
%description docs
|
||||
Documentation in html and pdf, plus man pages for valgrind tools and scripts.
|
||||
|
||||
%package scripts
|
||||
Summary: Scripts for post-processing valgrind tool output
|
||||
License: GPL-3.0-or-later AND (GPL-3.0-or-later OR MPL-2.0)
|
||||
# Most scripts can be used as is for post-processing a valgrind tool run.
|
||||
# But callgrind_control uses vgdb.
|
||||
Recommends: %{?scl_prefix}valgrind-gdb = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description scripts
|
||||
Perl and Python scripts for post-processing valgrind tool output.
|
||||
|
||||
%package gdb
|
||||
Summary: Tools for integrating valgrind and gdb
|
||||
License: GPL-3.0-or-later
|
||||
Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
|
||||
# vgdb can be used without gdb, just to control valgrind.
|
||||
# But normally you use it together with both valgrind and gdb.
|
||||
Recommends: gdb
|
||||
|
||||
%description gdb
|
||||
Tools and support files for integrating valgrind and gdb.
|
||||
|
||||
%if %{build_tools_devel}
|
||||
%package tools-devel
|
||||
Summary: Development files for building valgrind tools.
|
||||
|
|
@ -280,6 +246,8 @@ Header files and libraries for development of valgrind tools.
|
|||
%if %{build_openmpi}
|
||||
%package openmpi
|
||||
Summary: OpenMPI support for valgrind
|
||||
# See above, Hybrid-BSD like.
|
||||
License: bzip2-1.0.6
|
||||
Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description openmpi
|
||||
|
|
@ -291,72 +259,23 @@ Valgrind User Manual for details.
|
|||
%prep
|
||||
%setup -q -n %{?scl:%{pkg_name}}%{!?scl:%{name}}-%{version}
|
||||
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
# Disable s390x z13 support on old rhel, binutils is just too old.
|
||||
%if 0%{?rhel} == 6
|
||||
%patch5 -p1
|
||||
%endif
|
||||
|
||||
# Old rhel gcc doesn't have -fstack-protector-strong.
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%patch6 -p1
|
||||
%endif
|
||||
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
# This depends on patch6, old rhel gcc doesn't have -fstack-protector-strong.
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%patch14 -p1
|
||||
%endif
|
||||
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
|
||||
# Don't add s390x z14 support on old rhel, binutils is just too old.
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%patch19 -p1
|
||||
%endif
|
||||
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
%patch27 -p1
|
||||
%patch28 -p1
|
||||
%patch29 -p1
|
||||
%patch30 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
%patch -P1 -p1
|
||||
%patch -P2 -p1
|
||||
%patch -P3 -p1
|
||||
%patch -P4 -p1
|
||||
|
||||
%build
|
||||
# LTO triggers undefined symbols in valgrind. But valgrind has a
|
||||
# --enable-lto configure time option that we will use instead.
|
||||
%define _lto_cflags %{nil}
|
||||
|
||||
# Some patches (might) touch Makefile.am or configure.ac files.
|
||||
# Just always autoreconf so we don't need patches to prebuild files.
|
||||
./autogen.sh
|
||||
|
||||
# Old openmpi-devel has version depended paths for mpicc.
|
||||
%if %{build_openmpi}
|
||||
%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
|
||||
%define mpiccpath %{!?scl:%{_libdir}}%{?scl:%{_root_libdir}}/openmpi/bin/mpicc
|
||||
%else
|
||||
%define mpiccpath %{!?scl:%{_libdir}}%{?scl:%{_root_libdir}}/openmpi/*/bin/mpicc
|
||||
%endif
|
||||
%else
|
||||
# We explicitly don't want the libmpi wrapper. So make sure that configure
|
||||
# doesn't pick some random mpi compiler that happens to be installed.
|
||||
%define mpiccpath /bin/false
|
||||
|
|
@ -407,13 +326,15 @@ export LDFLAGS
|
|||
%configure \
|
||||
--with-mpicc=%{mpiccpath} \
|
||||
%{only_arch} \
|
||||
GDB=%{_bindir}/gdb
|
||||
GDB=%{_bindir}/gdb \
|
||||
--with-gdbscripts-dir=%{_datadir}/gdb/auto-load \
|
||||
--enable-lto
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%make_install
|
||||
mkdir docs/installed
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/valgrind/* docs/installed/
|
||||
rm -f docs/installed/*.ps
|
||||
|
|
@ -475,7 +396,7 @@ cat /proc/cpuinfo
|
|||
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
|
||||
# Make sure no extra CFLAGS, CXXFLAGS or LDFLAGS leak through,
|
||||
# the testsuite sets all flags necessary. See also configure above.
|
||||
make %{?_smp_mflags} CFLAGS="" CXXFLAGS="" LDFLAGS="" check
|
||||
%make_build CFLAGS="" CXXFLAGS="" LDFLAGS="" check
|
||||
|
||||
# Workaround https://bugzilla.redhat.com/show_bug.cgi?id=1434601
|
||||
# for gdbserver tests.
|
||||
|
|
@ -510,30 +431,62 @@ fi
|
|||
cat diffs
|
||||
echo ===============END TESTING===============
|
||||
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
|
||||
%files
|
||||
%doc COPYING NEWS README_*
|
||||
%doc docs/installed/html docs/installed/*.pdf
|
||||
%{_bindir}/*
|
||||
%license COPYING
|
||||
%{_bindir}/valgrind
|
||||
%dir %{_libexecdir}/valgrind
|
||||
# Install everything in the libdir except the .so.
|
||||
# The vgpreload so files might need file mode adjustment.
|
||||
%{_libexecdir}/valgrind/*[^o]
|
||||
# Install just the core tools, default suppression and vgpreload libraries.
|
||||
%{_libexecdir}/valgrind/default.supp
|
||||
%{_libexecdir}/valgrind/*-*-linux
|
||||
# Turn on executable bit again for vgpreload libraries.
|
||||
# Was disabled in %%install to prevent debuginfo stripping.
|
||||
%attr(0755,root,root) %{_libexecdir}/valgrind/vgpreload*-%{valarch}-*so
|
||||
%attr(0755,root,root) %{_libexecdir}/valgrind/vgpreload_*-%{valarch}-linux.so
|
||||
|
||||
%files docs
|
||||
%license COPYING.DOCS
|
||||
%doc NEWS README_*
|
||||
%doc docs/installed/html docs/installed/*.pdf
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%files scripts
|
||||
%license COPYING
|
||||
%{_bindir}/callgrind_annotate
|
||||
%{_bindir}/callgrind_control
|
||||
%{_bindir}/cg_annotate
|
||||
%{_bindir}/cg_diff
|
||||
%{_bindir}/cg_merge
|
||||
%{_bindir}/ms_print
|
||||
%{_libexecdir}/valgrind/dh_view.css
|
||||
%{_libexecdir}/valgrind/dh_view.html
|
||||
%{_libexecdir}/valgrind/dh_view.js
|
||||
|
||||
%files gdb
|
||||
%license COPYING
|
||||
%{_bindir}/valgrind-di-server
|
||||
%{_bindir}/valgrind-listener
|
||||
%{_bindir}/vgdb
|
||||
%{_bindir}/vgstack
|
||||
# gdb register descriptions
|
||||
%{_libexecdir}/valgrind/*.xml
|
||||
%{_datadir}/gdb/auto-load/valgrind-monitor.py
|
||||
%{_datadir}/gdb/auto-load/valgrind-monitor-def.py
|
||||
|
||||
%files devel
|
||||
%dir %{_includedir}/valgrind
|
||||
%{_includedir}/valgrind/valgrind.h
|
||||
%{_includedir}/valgrind/cachegrind.h
|
||||
%{_includedir}/valgrind/callgrind.h
|
||||
%{_includedir}/valgrind/drd.h
|
||||
%{_includedir}/valgrind/helgrind.h
|
||||
%{_includedir}/valgrind/memcheck.h
|
||||
%{_includedir}/valgrind/dhat.h
|
||||
%{_libdir}/pkgconfig/valgrind.pc
|
||||
|
||||
%if %{build_tools_devel}
|
||||
%files tools-devel
|
||||
%license COPYING
|
||||
%{_includedir}/valgrind/config.h
|
||||
%{_includedir}/valgrind/libvex*h
|
||||
%{_includedir}/valgrind/pub_tool_*h
|
||||
|
|
@ -549,19 +502,486 @@ echo ===============END TESTING===============
|
|||
%{_libdir}/valgrind/libmpiwrap*.so
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} == 6
|
||||
%post
|
||||
# There is a bug in rpm (rhbz#214737) that might cause post to be run
|
||||
# even thought the binary isn't installed when installing two multilib
|
||||
# versions at the same time.
|
||||
if [ -x %{_bindir}/valgrind ]; then
|
||||
# On RHEL6 the fs equivalency should be setup by the devtoolset meta
|
||||
# package, but because of a rpm bug (rhbz#924044) it might not work.
|
||||
%{?scl:/sbin/restorecon %{_bindir}/valgrind}%{!?scl:true}
|
||||
fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.27.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Wed May 20 2026 Mark Wielaard <mjw@fedoraproject.org> - 3.27.1-1
|
||||
- Valgrind 3.27.1 final
|
||||
|
||||
* Mon Apr 20 2026 Mark Wielaard <mjw@fedoraproject.org> - 3.27.0-1
|
||||
- Valgrind 3.27.0 final
|
||||
|
||||
* Fri Apr 17 2026 Mark Wielaard <mjw@fedoraproject.org> - 3.27.0-0.1.RC2
|
||||
- Upstream 3.27.0-RC2
|
||||
|
||||
* Mon Apr 13 2026 Mark Wielaard <mjw@fedoraproject.org> - 3.27.0-0.1.RC1
|
||||
- Upstream 3.27.0-RC1
|
||||
- Remove all VALGRIND_3_26_BRANCH and proposed upstream patches
|
||||
|
||||
* Thu Jan 29 2026 Mark Wielaard <mjw@fedoraproject.org> - 3.26.0-5
|
||||
- Add 0001-Refix-still_reachable-xml-closing-tag-and-add-testca.patch
|
||||
|
||||
* Mon Jan 26 2026 Mark Wielaard <mjw@fedoraproject.org> - 3.26.0-4
|
||||
- Add more VALGRIND_3_26_BRANCH patches
|
||||
- 0007-Bug-514613-Unclosed-leak_summary-still_reachable-tag.patch
|
||||
- 0008-Bug-514206-Assertion-sr_isError-sr-failed-mmap-fd-po.patch
|
||||
|
||||
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.26.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Thu Jan 8 2026 Mark Wielaard <mjw@fedoraproject.org> - 3.26.0-2
|
||||
- Add VALGRIND_3_26_BRANCH patches
|
||||
- 0001-Prepare-NEWS-for-branch-3.26-fixes.patch
|
||||
- 0002-Bug-511972-valgrind-3.26.0-tests-fail-to-build-on-up.patch
|
||||
- 0003-readlink-proc-self-exe-overwrites-buffer-beyond-its-.patch
|
||||
- 0004-Linux-DRD-suppression-add-an-entry-for-__is_decorate.patch
|
||||
- 0005-Linux-Helgrind-add-a-suppression-for-_dl_allocate_tl.patch
|
||||
- 0006-Disable-linux-madvise-MADV_GUARD_INSTALL.patch
|
||||
|
||||
* Fri Oct 24 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.26.0-1
|
||||
- Valgrind 3.26.0 final
|
||||
- Clarify License of valgrind-scripts.
|
||||
|
||||
* Sat Oct 18 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.26.0-0.1.RC1
|
||||
- Upstream 3.26.0-RC1
|
||||
- Remove all VALGRIND_3_25_BRANCH and proposed upstream patches
|
||||
- Refresh some-stack-protector and some-Wl-z-now patches.
|
||||
- Add vgstack to valgrind-gdb.
|
||||
- Update License to GPL-3.0-or-later
|
||||
|
||||
* Mon Aug 11 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.25.1-4
|
||||
- Add ppc64-strcmp-ld.patch
|
||||
- Add 0003-Add-several-missing-syscall-hooks-to-ppc64-linux.patch
|
||||
|
||||
* Tue Aug 5 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.25.1-3
|
||||
- Add VALGRIND_3_25_BRANCH patches
|
||||
- 0001-Prepare-NEWS-for-branch-3.25.x-fixes.patch
|
||||
- 0002-Bug-503241-s390x-Support-z17-changes-to-the-NNPA-ins.patch
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.25.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Tue May 20 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.25.1-1
|
||||
- Valgrind 3.25.1 final
|
||||
|
||||
* Fri May 16 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.25.0-3
|
||||
- Add 2 more VALGRIND_3_25_BRANCH patches
|
||||
|
||||
* Fri May 9 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.25.0-2
|
||||
- Add VALGRIND_3_25_BRANCH patches
|
||||
|
||||
* Fri Apr 25 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.25.0-1
|
||||
- Valgrind 3.25.0 final
|
||||
|
||||
* Wed Apr 23 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.25.0-0.1.RC2
|
||||
- Upstream 3.25.0-RC2
|
||||
|
||||
* Fri Apr 18 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.25.0-0.1.RC1
|
||||
- Upstream 3.25.0-RC1
|
||||
- Remove all VALGRIND_3_24_BRANCH patches
|
||||
- Enable riscv64 arch support
|
||||
|
||||
* Sun Mar 30 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.24.0-8
|
||||
- Add new VALGRIND_3_24_BRANCH patches
|
||||
- 0019-filter_gdb.in-__syscall_cancel_arch-is-just-in-a-sys.patch
|
||||
- 0020-Bug-501893-Missing-suppression-for-__wcscat_avx2-str.patch
|
||||
- 0021-filter_gdb.in-filter-out-__libc_do_syscall.patch
|
||||
- 0022-Handle-top-__syscall_cancel-frames-when-getting-stac.patch
|
||||
- Remove valgrind-3.24.0-syscall-cancel.patch (replaced by 0022).
|
||||
|
||||
* Fri Mar 28 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.24.0-7
|
||||
- Add valgrind-3.24.0-syscall-cancel.patch
|
||||
|
||||
* Wed Mar 12 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.24.0-6
|
||||
- More VALGRIND_3_24_BRANCH patches
|
||||
0016-syswrap-generic-Emit-pp_ExeContext-after-the-file-de.patch
|
||||
0017-add_hardwired_spec-for-ld-linux-x86-64.so.2-memcmp.patch
|
||||
0018-gdbserver_tests-filter-out-new-Missing-rpms-message.patch
|
||||
|
||||
* Fri Jan 17 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.24.0-5
|
||||
- valgrind-devel now Recommends, instead of Requires, valgrind.
|
||||
- valgrind-gdb now Requires valgrind, instead of valgrind-devel.
|
||||
- valgrind-scripts now Recommends valgrind-gdb
|
||||
- valgrind-gdb now Recommends gdb
|
||||
|
||||
* Wed Jan 15 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.24.0-4
|
||||
- Add 0015-ppc-test_dfp2-build-fix-for-GCC-15.patch
|
||||
|
||||
* Tue Jan 14 2025 Mark Wielaard <mjw@fedoraproject.org> - 3.24.0-3
|
||||
- Add more VALGRIND_3_24_BRANCH patches
|
||||
0012-Recognize-new-DWARF5-DW_LANG-constants.patch
|
||||
0013-Bug-498317-FdBadUse-is-not-a-valid-CoreError-type-in.patch
|
||||
0014-linux-support-EVIOCGRAB-ioctl.patch
|
||||
- Split main valgrind package into several subpackages:
|
||||
- valgrind now contains just the core tools.
|
||||
- valgrind-scripts contains the post-processing scripts for callgrind,
|
||||
cachegrind, massif and dhat which depend on perl and python.
|
||||
- valgrind-gdb contains the debuginfo client/server and (v)gdb support.
|
||||
- valgrind-docs contains the man pages, html and pdf manual.
|
||||
* Tue Nov 26 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.24.0-2
|
||||
- Add VALGRIND_3_24_BRANCH patches
|
||||
0001-Prepare-NEWS-for-branch-3.24-fixes.patch
|
||||
0002-vgdb.c-fork_and_exec_valgrind-Fix-off-by-one-error-w.patch
|
||||
0003-vgdb.c-fork_and_exec_valgrind-Fix-another-off-by-one.patch
|
||||
0004-regtest-add-a-fdleak-filter-for-write-on-write-on-li.patch
|
||||
0005-Add-exp-and-supp-patterns-for-missing-main-frame-for.patch
|
||||
0006-Add-additional-exp-ppc64le-files-to-EXTRA_DIST.patch
|
||||
0007-Add-support-for-landlock_create_ruleset-444-landlock.patch
|
||||
0008-helgrind-tests-tc17_sembar.c-Remove-bool-typedef.patch
|
||||
0009-drd-tests-swapcontext.c-Rename-typedef-struct-thread.patch
|
||||
0010-none-tests-bug234814.c-sa_handler-take-an-int-as-arg.patch
|
||||
0011-Add-open_tree-move_mount-fsopen-fsconfig-fsmount-fsp.patch
|
||||
|
||||
* Mon Nov 4 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.24.0-1
|
||||
- Upstream 3.24.0 final
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.23.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Sat Jul 6 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.23.0-4
|
||||
- Add more upstream VALGRIND_3_23_BRANCH patches
|
||||
0016-mips-skip-using-shared-syscall-numbers-for-mips64.patch
|
||||
0017-gdbserver_tests-filters-remove-python-rpm-module-loa.patch
|
||||
0018-Implement-VMOVQ-xmm1-xmm2-m64.patch
|
||||
0019-arm64-Fix-fcvtas-instruction.patch
|
||||
0020-gdbserver_tests-filters-remove-more-verbose-python-r.patch
|
||||
0021-Avoid-dev-inode-check-on-btrfs-with-sanity-level-3.patch
|
||||
|
||||
* Sun Jun 23 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.23.0-3
|
||||
- Add more upstream VALGRIND_3_23_BRANCH patches
|
||||
0012-Bug-487439-SIGILL-in-JDK11-JDK17.patch
|
||||
0013-Don-t-leave-fds-created-with-log-file-xml-file-or-lo.patch
|
||||
0014-Close-both-internal-pipe-fds-after-VG_-fork-in-paren.patch
|
||||
0015-Don-t-allow-programs-calling-fnctl-on-valgrind-s-own.patch
|
||||
|
||||
* Mon Jun 10 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.23.0-2
|
||||
- Add upstream VALGRIND_3_23_BRANCH patches
|
||||
|
||||
* Fri Apr 26 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.23.0-1
|
||||
- Upstream 3.23.0 final
|
||||
|
||||
* Thu Apr 25 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.23.0-0.2.RC2
|
||||
- configure --enable-lto
|
||||
|
||||
* Wed Apr 24 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.23.0-0.1.RC2
|
||||
- Upstream 3.23.0-RC2
|
||||
|
||||
* Sat Apr 20 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.23.0-0.1.RC1
|
||||
+- Upstream 3.23.0-RC1
|
||||
+- Remove all upstreamed patches
|
||||
|
||||
* Sat Apr 13 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-8
|
||||
- Add BuildRequires: python3-devel for running testsuite.
|
||||
- Add valgrind-3.22.0-gdb-thread-exited.patch
|
||||
- Add valgrind-3.22.0-set_vma_name-supp.patch
|
||||
- Add valgrind-3.22.0-pth_mempcpy_false_races.patch
|
||||
- Add valgrind-3.22.0-amd64-VFMADD213.patch
|
||||
- Add valgrind-3.22.0-amd64-redir-strcmp.patch
|
||||
|
||||
* Mon Mar 11 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-7
|
||||
- Add valgrind-3.22.0-gcc-builtin_strcmp-128-256-bit-vector.patch
|
||||
|
||||
* Mon Mar 4 2024 Mark Wielaard <mjw@fedoraproject.org>
|
||||
- Update Fedora license tags to spdx license tags
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.22.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Mon Jan 22 2024 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-5
|
||||
- Add valgrind-3.22.0-x86-nop.patch
|
||||
|
||||
* Sat Dec 9 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-4
|
||||
- Add valgrind-3.22.0-fchmodat2.patch
|
||||
- Prep for migration to SPDX identifiers
|
||||
|
||||
* Tue Dec 5 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-3
|
||||
- Add valgrind-3.22.0-rodata.patch
|
||||
|
||||
* Fri Nov 17 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-2
|
||||
- Add valgrind-3.22.0-valgrind-monitor-python-re.patch
|
||||
- Drop support for rhel6
|
||||
|
||||
* Tue Oct 31 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-1
|
||||
- Upstream 3.22.0 final
|
||||
- BuildRequires elfutils-debuginfod for testing
|
||||
|
||||
* Mon Oct 30 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-0.2.RC2
|
||||
- Update valgrind-3.21.0-no-memcpy-replace-check.patch
|
||||
- Fedora 40 dropped openmpi support on i386
|
||||
|
||||
* Thu Oct 26 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-0.1.RC2
|
||||
- Upstream 3.22.0-RC2
|
||||
|
||||
* Tue Oct 17 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.22.0-0.1.RC1
|
||||
- Upstream 3.22.0-RC1
|
||||
- Remove all upstreamed patches
|
||||
- Adjust valgrind-3.16.0-some-stack-protector.patch
|
||||
- Adjust valgrind-3.16.0-some-Wl-z-now.patch
|
||||
- Add cachegrind.h to valgrind-devel package
|
||||
|
||||
* Mon Aug 21 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-10
|
||||
- Add valgrind-3.21.0-lazy-debuginfo.patch
|
||||
- Add valgrind-3.21.0-cleanup-read_elf_object.patch
|
||||
|
||||
* Thu Aug 17 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-9
|
||||
- Add valgrind-3.21.0-gdb-multi-mode-stdout-redirecting-to-stderr.patch
|
||||
- Use %%patch -Pn instead of deprecated %%patchn
|
||||
|
||||
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.21.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jun 22 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-7
|
||||
- Add valgrind-3.21.0-vgm.patch and valgrind-3.21.0-vgm-tests.patch
|
||||
- Add valgrind-3.21.0-pgste.patch
|
||||
|
||||
* Thu Jun 1 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-6
|
||||
- Add valgrind-3.21.0-callgrind_control-no-strict.patch
|
||||
- Add valgrind-3.21.0-realloc-again.patch
|
||||
|
||||
* Tue May 30 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-5
|
||||
- Update valgrind-3.21.0-no-memcpy-replace-check.patch (memcpy_chk)
|
||||
|
||||
* Wed May 17 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-4
|
||||
- Add valgrind-3.21.0-epoll_pwait2.patch
|
||||
|
||||
* Tue May 16 2023 Alexandra Hájková <ahajkova@redhat.com> - 3.21.0-3
|
||||
- Add valgrind-3.21.0-Add-with-gdbscripts-dir.patch
|
||||
|
||||
* Fri May 5 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-2
|
||||
- Add valgrind-3.21.0-no-memcpy-replace-check.patch
|
||||
|
||||
* Fri Apr 28 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-1
|
||||
- Upstream 3.21.0 final
|
||||
|
||||
* Sat Apr 22 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-0.1.RC2
|
||||
- Upstream 3.21.0-RC2
|
||||
|
||||
* Fri Apr 21 2023 Mark Wielaard <mjw@fedoraproject.org> - 3.21.0-0.1.RC1
|
||||
- Upstream 3.21.0-RC1
|
||||
- Remove upstreamed valgrind-faultstatus-implicit-int.patch
|
||||
- Adjust valgrind-3.16.0-some-{Wl-z-now,stack-protector}.patch
|
||||
cg_merge is now a pything script.
|
||||
|
||||
* Fri Nov 18 2022 Florian Weimer <fweimer@redhat.com> - 1:3.20.0-2
|
||||
- Avoid using implicit int C89 feature
|
||||
|
||||
* Mon Oct 24 2022 Mark Wielaard <mjw@fedoraproject.org> - 3.20.0-1
|
||||
- Upgrade to valgrind 3.20.0. Drop old patches.
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.19.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Wed May 25 2022 Mark Wielaard <mjw@fedoraproject.org> - 3.19.0-3
|
||||
- Add valgrind-3.19.0-s390x-memmem.patch
|
||||
|
||||
* Fri May 13 2022 Mark Wielaard <mjw@fedoraproject.org> - 3.19.0-2
|
||||
- Add valgrind-3.19.0-ld-so-strncmp.patch
|
||||
|
||||
* Tue Apr 12 2022 Mark Wielaard <mjw@fedoraproject.org> - 3.19.0-1
|
||||
- Upgrade to valgrind 3.19.0. Drop old patches.
|
||||
|
||||
* Tue Feb 8 2022 Mark Wielaard <mjw@fedoraproject.org>
|
||||
- Add valgrind-3.18.1-ppc64-cmov.patch
|
||||
- Add valgrind-3.18.1-arm64-atomics-rdm.patch
|
||||
- Add valgrind-3.18.1-rust-demangle-suffix.patch
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.18.1-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jan 12 2022 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-8
|
||||
- Add valgrind-3.18.1-ppc-hwcaps.patch
|
||||
- Add valgrind-3.18.1-s390x-wflrx.patch
|
||||
|
||||
* Sat Dec 11 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-7
|
||||
-Add valgrind-3.18.1-s390x-vdso.patch
|
||||
|
||||
* Fri Dec 10 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-6
|
||||
- Add valgrind-3.18.1-rseq-enosys.patch
|
||||
|
||||
* Mon Nov 22 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-5
|
||||
- Add valgrind-3.18.1-demangle-namespace.patch
|
||||
|
||||
* Fri Nov 19 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-4
|
||||
- Add valgrind-3.18.1-condvar.patch
|
||||
|
||||
* Wed Nov 17 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-3
|
||||
- Add valgrind-3.18.1-ppc-pstq.patch
|
||||
- Add valgrind-3.18.1-ppc-pstq-tests.patch
|
||||
- Add valgrind-3.18.1-gdbserver_tests-hwcap.patch
|
||||
- Add valgrind-3.18.1-rust-v0-demangle.patch
|
||||
- Add valgrind-3.18.1-arm64-doubleword-cas.patch
|
||||
- Add valgrind-3.18.1-arm64-ldaxp-stlxp.patch
|
||||
- Add valgrind-3.18.1-arm64-atomic-align.patch
|
||||
- Add valgrind-3.18.1-amd64-more-spec-rules.patch
|
||||
|
||||
* Mon Nov 1 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.1-2
|
||||
- Add valgrind-3.18.1-dhat-tests-copy.patch
|
||||
- Add valgrind-3.18.1-s390x-EXRL.patch
|
||||
- Add valgrind-3.18.1-ppc64-lxsibzx-lxsihzx.patch
|
||||
|
||||
* Fri Oct 15 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.0-1
|
||||
- Update to upstream 3.18.1 final
|
||||
|
||||
* Wed Oct 13 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.18.0-0.1.RC1
|
||||
- Update to upstream 3.18.0-RC1
|
||||
- Drop all upstreamed patches
|
||||
|
||||
* Mon Sep 20 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-13
|
||||
- Add valgrind-3.17.0-dwarf-atomic_type.patch
|
||||
- Add valgrind-3.17.0-faster-readdwarf3.patch
|
||||
|
||||
* Wed Sep 8 2021 Mark Wielaard <mjw@fedoraproject.org>
|
||||
- Add valgrind-3.17.0-ppc64-test_isa_3_1_VRT.patch
|
||||
|
||||
* Wed Aug 25 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-12
|
||||
- Add valgrind-3.17.0-vgdb-queued-signals.patch
|
||||
- Add valgrind-3.17.0-ppc64-test-isa-3-1.patch
|
||||
- Add valgrind-3.17.0-ppc64-pstxvp.patch
|
||||
|
||||
* Fri Aug 6 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-11
|
||||
- Add valgrind-3.17.0-ppc64-statfs64.patch
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.17.0-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jul 21 2021 Mark Wielaard <mjw@fedoraproject.org>
|
||||
- Add valgrind-3.17.0_start.patch
|
||||
|
||||
* Wed Jul 21 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-9
|
||||
- Add valgrind-3.17.0-clone3.patch
|
||||
|
||||
* Sat Jul 17 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-8
|
||||
- Update drd suppression for native ld.so names.
|
||||
|
||||
* Sat Jul 17 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-7
|
||||
- Add gdbserver_tests-update-filters-for-newer-glibc-gdb.patch
|
||||
- Add helgrind-and-drd-suppression-libc-and-libpthread.patch
|
||||
- Remove valgrind-3.9.0-helgrind-race-supp.patch
|
||||
|
||||
* Fri Jul 9 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-6
|
||||
- Update to include fixed CI gating tests.
|
||||
|
||||
* Fri Jun 18 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-5
|
||||
- Add valgrind-3.17.0-s390-prep.patch
|
||||
- Add valgrind-3.17.0-s390-z15.patch
|
||||
- Add valgrind-3.17.0-s390-z13-vec-fix.patch
|
||||
|
||||
* Thu Jun 3 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-4
|
||||
- Add valgrind-3.17.0-s390_insn_as_string.patch
|
||||
- Add valgrind-3.17.0-debuginfod.patch
|
||||
- Add valgrind-3.17.0-clone-parent-res.patch
|
||||
|
||||
* Tue May 4 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-3
|
||||
- Add valgrind-3.17.0-ppc64-isa-3.1{,tests}.patch
|
||||
|
||||
* Fri Apr 16 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-2
|
||||
- Add CI gating
|
||||
|
||||
* Mon Mar 22 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-1
|
||||
- Update to upstream 3.17.0 final.
|
||||
|
||||
* Wed Mar 17 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-0.1.RC2
|
||||
- Update to upstream 3.17.0-RC2
|
||||
|
||||
* Mon Mar 15 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.17.0-0.1.RC1
|
||||
- Update to upstream 3.17.0-RC1
|
||||
- Drop all upstreamed patches
|
||||
|
||||
* Wed Mar 3 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-20
|
||||
- Add valgrind-3.16.1-arm64_sp_lr_fp_DwReg.patch
|
||||
|
||||
* Sun Feb 21 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-19
|
||||
- Add valgrind-3.16.1-readdwarf-line.patch
|
||||
|
||||
* Sat Feb 6 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-18
|
||||
- Update valgrind-3.16.1-open-proc-self-exe.patch to handle openat
|
||||
|
||||
* Sat Feb 6 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-17
|
||||
- Add valgrind-3.16.1-open-proc-self-exe.patch
|
||||
|
||||
* Wed Feb 3 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-16
|
||||
- Add valgrind-3.16.0-shmctl.patch
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.16.1-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Jan 25 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-14
|
||||
- Add valgrind-3.16.1-dwarf5.patch
|
||||
|
||||
* Fri Jan 8 2021 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-13
|
||||
- Add valgrind-3.16.1-ppc64-scv-hwcap.patch
|
||||
|
||||
* Sun Dec 20 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-12
|
||||
- Add valgrind-3.16.1-ficlone.patch
|
||||
- Add valgrind-3.16.1-arm64-expensive-cmp.patch
|
||||
|
||||
* Thu Dec 17 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-11
|
||||
- Update valgrind-3.16.1-arm64-fma.patch
|
||||
|
||||
* Tue Dec 15 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-10
|
||||
- Add valgrind-3.16.1-arm64-fma.patch
|
||||
|
||||
* Sun Dec 13 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-9
|
||||
- Add valgrind-3.16.1-stxsibx-stxsihx.patch
|
||||
|
||||
* Thu Dec 3 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-8
|
||||
- Update valgrind-3.16.1-s390x-z14-vector.patch
|
||||
|
||||
* Thu Dec 3 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-7
|
||||
- Add valgrind-3.16.1-pthread-intercept.patch
|
||||
- Add valgrind-3.16.1-s390_emit_load_mem.patch
|
||||
- Add valgrind-3.16.1-s390x-z14-vector.patch
|
||||
|
||||
* Mon Nov 9 2020 Mark Wielaard <mjw@fedoraproject.org>
|
||||
- Add BuildRequires which (#1895773)
|
||||
|
||||
* Fri Oct 16 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-6
|
||||
- Add valgrind-3.16.1-faccessat2.patch
|
||||
- Add valgrind-3.16.1-gdbserver_nlcontrolc.patch
|
||||
- Add valgrind-3.16.1-PPC64BE-lsw.patch
|
||||
|
||||
* Tue Aug 18 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-5
|
||||
- Update valgrind-3.16.1-epoll.patch
|
||||
|
||||
* Mon Jul 27 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-4
|
||||
- Add valgrind-3.16.1-REX-prefix-JMP.patch
|
||||
- Add valgrind-3.16.1-epoll.patch
|
||||
- Add valgrind-3.16.1-sched_getsetattr.patch
|
||||
- Add valgrind-3.16.1-dl_runtime_resolve.patch
|
||||
|
||||
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 3.16.1-3
|
||||
- Use make macros
|
||||
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||
|
||||
* Wed Jul 8 2020 Jeff Law <law@redhat.org> - 3.16.1-2
|
||||
- Disable LTO
|
||||
|
||||
* Tue Jun 23 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.1-1
|
||||
- Update to upstream valgrind 3.16.1.
|
||||
|
||||
* Fri Jun 19 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-3
|
||||
- Add valgrind-3.16.0-ppc-L-field.patch
|
||||
|
||||
* Wed May 27 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-2
|
||||
- Apply stack-protector and -Wl,z,now patches.
|
||||
|
||||
* Wed May 27 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-1
|
||||
- Update to upstream valgrind 3.16.0 final.
|
||||
|
||||
* Tue May 19 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-0.4.RC2
|
||||
- Add docbook-dtds to BuildRequires.
|
||||
|
||||
* Tue May 19 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-0.3.RC2
|
||||
- Update to upstream 3.16.0 RC2
|
||||
|
||||
* Fri May 1 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-0.2.GIT
|
||||
- Update to upstream 3.16.0 branch point (commit 55cdb7c4e)
|
||||
|
||||
* Fri Apr 17 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.16.0-0.1.GIT
|
||||
- Update to upstream 3.16.0-GIT (commit 52d02fe23)
|
||||
- Drop all streamed patches.
|
||||
|
||||
* Wed Mar 4 2020 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-20
|
||||
- Add valgrind-3.15.0-z15.patch
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue