diff --git a/strace-5.14-Subject-PATCH-tests-prctl-sve-fix-prctl-PR_SVE_GET_V.patch b/strace-5.14-Subject-PATCH-tests-prctl-sve-fix-prctl-PR_SVE_GET_V.patch new file mode 100644 index 0000000000000000000000000000000000000000..363a190283543f4eacc762be137ceb627b2efa41 --- /dev/null +++ b/strace-5.14-Subject-PATCH-tests-prctl-sve-fix-prctl-PR_SVE_GET_V.patch @@ -0,0 +1,54 @@ +From ca4a180242a1f7673aaec946015d513dc69ae92a Mon Sep 17 00:00:00 2001 +From: chenzanyu +Date: Thu, 1 Jun 2023 20:34:13 +0800 +Subject: [PATCH] Subject: [PATCH] tests/prctl-sve: fix prctl(PR_SVE_GET_VL) + return expected value printing + +reason: tests/prctl-sve.c: Print the expected return value string based +on the value returned, similarly to the way it is done +in tests/prctl-sme.c:print_sme_vl_arg(). + +Signed-off-by: chenzanyu +--- + tests/prctl-sve.c | 24 ++++++++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +diff --git a/tests/prctl-sve.c b/tests/prctl-sve.c +index 4cef149..aa8183d 100644 +--- a/tests/prctl-sve.c ++++ b/tests/prctl-sve.c +@@ -43,12 +43,28 @@ 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_SET_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.12.3 \ No newline at end of file diff --git a/strace.spec b/strace.spec index 69056808373af601917cee5812ff0d82395c4efa..60f09c9c357b6cc8b40a48604c6423e8c0e1f076 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-Subject-PATCH-tests-prctl-sve-fix-prctl-PR_SVE_GET_V.patch BuildRequires: gcc gzip # Install Bluetooth headers for AF_BLUETOOTH sockets decoding. @@ -106,6 +107,9 @@ wait %{_mandir}/man1/* %changelog +* Thur June 1 2023 chenzanyu - 5.14-5 +- fix prctl(PR_SVE_GET_VL) return expected value printing + * Tue Apr 4 2023 chenzanyu - 5.14-4 - solve ilp32 strace build error