diff --git a/strace-5.14-fix-prctl-PRSVE_GET_V.patch b/strace-5.14-fix-prctl-PRSVE_GET_V.patch new file mode 100644 index 0000000000000000000000000000000000000000..afcfe41d66e11921bf719153d706578893453c2b --- /dev/null +++ b/strace-5.14-fix-prctl-PRSVE_GET_V.patch @@ -0,0 +1,50 @@ +From 327e484c66aac2f130f82eff080ad7e1ef21c694 Mon Sep 17 00:00:00 2001 +From: chenzanyu +Date: Tue, 6 Jun 2023 13:08:39 +0000 +Subject: [PATCH] Subject: [PATCH] tests/prctl-sve: fix prctl(PR_SVE_GET_VL) + return expected value printing + +reason: fix prctl(PR_SVE_GET_VL) return expected value printing + +Signed-off-by: chenzanyu +--- + tests/prctl-sve.c | 22 ++++++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) + +diff --git a/tests/prctl-sve.c b/tests/prctl-sve.c +index 4cef149..4278b58 100644 +--- a/tests/prctl-sve.c ++++ b/tests/prctl-sve.c +@@ -43,12 +43,26 @@ main(void) + (unsigned long) 0xff, sprintrc(rc)); + + rc = syscall(__NR_prctl, PR_SVE_GET_VL); +- printf("prctl(PR_SVE_GET_VL) = %s", sprintrc(rc)); ++ printf("prctl(PR_SVE_GET_VL) = "); + if (rc >= 0) { +- printf(" (PR_SVE_SET_VL_ONEXEC|PR_SVE_VL_INHERIT|%#lx)", +- (unsigned long) 0xff); ++ printf("%#lx", rc); ++ if (rc > 0xffff) { ++ printf(" ("); ++ if (rc & PR_SVE_SET_VL_ONEXEC) ++ printf("PR_SVE_VL_ONEXEC"); ++ if (rc & PR_SVE_VL_INHERIT) { ++ printf("%sPR_SVE_VL_INHERIT",rc & PR_SVE_SET_VL_ONEXEC ? "|" : ""); ++ } ++ if (rc & ~0x6ffffU) { ++ printf("%s%#lx",rc & 0x60000 ? "|" : "", rc & ~0x6ffffU); ++ } ++ printf("|%#lx)\n", rc & 0xffffU); ++ } else { ++ puts(""); ++ } ++ } else { ++ puts(sprintrc(rc)); + } +- puts(""); + + puts("+++ exited with 0 +++"); + return 0; +-- +2.33.0 \ No newline at end of file diff --git a/strace.spec b/strace.spec index 69056808373af601917cee5812ff0d82395c4efa..ad68296e9cb3549b90be5be737f59e880c4520ff 100644 --- a/strace.spec +++ b/strace.spec @@ -3,7 +3,7 @@ Summary: Tracks and displays system calls associated with a running process Name: strace Version: 5.14 -Release: 4 +Release: 5 # The test suite is GPLv2+, all the rest is LGPLv2.1+. License: LGPL-2.1+ and GPL-2.0+ # Some distros require Group tag to be present, @@ -22,6 +22,7 @@ Patch1: strace-5.14-sw.patch %endif Patch2: strace-5.14-loongarch64.patch Patch3: strace-5.14-solve-ilp32-strace-build-error.patch +Patch4: strace-5.14-fix-prctl-PRSVE_GET_V.patch BuildRequires: gcc gzip # Install Bluetooth headers for AF_BLUETOOTH sockets decoding. @@ -88,15 +89,17 @@ done wait %check -# testcases which read /dev/full will fail because /dev/full is rw--w--w-- and -# needsrootforbuild cannot take affect -#%{buildroot}%{_bindir}/strace -V -#make %{?_smp_mflags} -k check VERBOSE=1 -#echo 'BEGIN OF TEST SUITE INFORMATION' -#tail -n 99999 -- tests*/test-suite.log tests*/ksysent.gen.log -#find tests* -type f -name '*.log' -print0 | -# xargs -r0 grep -H '^KERNEL BUG:' -- ||: -#echo 'END OF TEST SUITE INFORMATION' +width=$(echo __LONG_WIDTH__ |%__cc -E -P -) + +if [ "${width}" != 32 ]; then + %{buildroot}%{_bindir}/strace -V + %make_build -k check VERBOSE=1 + echo 'BEGIN OF TEST SUITE INFORMATION' + tail -n 99999 -- tests*/test-suite.log tests*/ksysent.gen.log + find tests* -type f -name '*.log' -print0 | + xargs -r0 grep -H '^KERNEL BUG:' -- ||: + echo 'END OF TEST SUITE INFORMATION' +fi %files %maybe_use_defattr @@ -106,6 +109,9 @@ wait %{_mandir}/man1/* %changelog +* Wed Jun 7 2023 chenzanyu - 5.14-5 +- fix prctl PR_SVE_GET_V + * Tue Apr 4 2023 chenzanyu - 5.14-4 - solve ilp32 strace build error