Add valgrind-3.15.0-scalar-arm64.patch

This commit is contained in:
Mark Wielaard 2019-05-20 00:18:54 +02:00
parent c05f9d2147
commit e4df764a32
2 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,83 @@
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");

View File

@ -103,6 +103,12 @@ Patch8: valgrind-3.15.0-copy_file_range.patch
# KDE#407307 Intercept stpcpy also in ld.so for arm64 # KDE#407307 Intercept stpcpy also in ld.so for arm64
Patch9: valgrind-3.15.0-arm64-ld-stpcpy.patch 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
BuildRequires: glibc-devel BuildRequires: glibc-devel
%if %{build_openmpi} %if %{build_openmpi}
@ -238,6 +244,8 @@ Valgrind User Manual for details.
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1 %patch9 -p1
%patch10 -p1
%patch11 -p1
%build %build
@ -458,6 +466,10 @@ fi
%endif %endif
%changelog %changelog
* Sun May 17 2019 Mark Wielaard <mjw@fedoraproject.org>
- Add valgrind-3.15.0-exp-sgcheck-no-aarch64.patch
- Add valgrind-3.15.0-scalar-arm64.patch
* Tue May 7 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-4 * Tue May 7 2019 Mark Wielaard <mjw@fedoraproject.org> - 3.15.0-4
- Add valgrind-3.15.0-arm64-ld-stpcpy.patch - Add valgrind-3.15.0-arm64-ld-stpcpy.patch