From 59ffb7e7011b1b9742f33387611806bba7820595 Mon Sep 17 00:00:00 2001 From: yangxianzhao Date: Thu, 7 Sep 2023 15:29:17 +0800 Subject: [PATCH] update to strace-4.24-7.el7_9 --- ...ace-anolis-fix-nsyscalls-check-error.patch | 95 ------------ ...call-on-architectures-that-use-gener.patch | 37 ----- ...le_load-syscall-on-architectures-tha.patch | 39 ----- ...ndex-fix-IFNAME_QUOTED_SZ-definition.patch | 50 ++++++ ...size-in-some-tests-that-invoke-clone.patch | 146 ------------------ ...69dec27cf638df0e17db80ed937c3e1abf77.patch | 71 --------- strace.spec | 70 +++------ 7 files changed, 70 insertions(+), 438 deletions(-) delete mode 100644 0001-strace-anolis-fix-nsyscalls-check-error.patch delete mode 100644 0100-Wire-up-rseq-syscall-on-architectures-that-use-gener.patch delete mode 100644 0101-Wire-up-kexec_file_load-syscall-on-architectures-tha.patch create mode 100644 0167-print_ifindex-fix-IFNAME_QUOTED_SZ-definition.patch delete mode 100644 1001-tests-increase-the-child-stack-size-in-some-tests-that-invoke-clone.patch delete mode 100644 strace-b89a69dec27cf638df0e17db80ed937c3e1abf77.patch diff --git a/0001-strace-anolis-fix-nsyscalls-check-error.patch b/0001-strace-anolis-fix-nsyscalls-check-error.patch deleted file mode 100644 index fd2e27d..0000000 --- a/0001-strace-anolis-fix-nsyscalls-check-error.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 6fff5c1974c097233b31b24a7e1bbaf8e71f546d Mon Sep 17 00:00:00 2001 -From: mahailiang -Date: Thu, 4 Feb 2021 09:32:02 +0800 -Subject: [PATCH] fix nsyscalls check error - ---- - tests-m32/nsyscalls.c | 8 ++++---- - tests-mx32/nsyscalls.c | 8 ++++---- - tests/nsyscalls.c | 8 ++++---- - 3 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/tests-m32/nsyscalls.c b/tests-m32/nsyscalls.c -index 681fb31..e2ebbf9 100644 ---- a/tests-m32/nsyscalls.c -+++ b/tests-m32/nsyscalls.c -@@ -82,18 +82,18 @@ test_syscall(const unsigned long nr) - - #ifdef LINUX_MIPSO32 - printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" -- " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT, -- a[0], a[1], a[2], a[3], a[4], a[5], rc); -+ " = %s\n", nr | SYSCALL_BIT, -+ a[0], a[1], a[2], a[3], a[4], a[5], sprintrc(rc)); - #else - printf("syscall_%#lx(%#llx, %#llx, %#llx, %#llx, %#llx, %#llx)" -- " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT, -+ " = %s\n", nr | SYSCALL_BIT, - (unsigned long long) a[0], - (unsigned long long) a[1], - (unsigned long long) a[2], - (unsigned long long) a[3], - (unsigned long long) a[4], - (unsigned long long) a[5], -- rc); -+ sprintrc(rc)); - #endif - } - -diff --git a/tests-mx32/nsyscalls.c b/tests-mx32/nsyscalls.c -index 681fb31..e2ebbf9 100644 ---- a/tests-mx32/nsyscalls.c -+++ b/tests-mx32/nsyscalls.c -@@ -82,18 +82,18 @@ test_syscall(const unsigned long nr) - - #ifdef LINUX_MIPSO32 - printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" -- " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT, -- a[0], a[1], a[2], a[3], a[4], a[5], rc); -+ " = %s\n", nr | SYSCALL_BIT, -+ a[0], a[1], a[2], a[3], a[4], a[5], sprintrc(rc)); - #else - printf("syscall_%#lx(%#llx, %#llx, %#llx, %#llx, %#llx, %#llx)" -- " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT, -+ " = %s\n", nr | SYSCALL_BIT, - (unsigned long long) a[0], - (unsigned long long) a[1], - (unsigned long long) a[2], - (unsigned long long) a[3], - (unsigned long long) a[4], - (unsigned long long) a[5], -- rc); -+ sprintrc(rc)); - #endif - } - -diff --git a/tests/nsyscalls.c b/tests/nsyscalls.c -index ce40cf2..2fc6938 100644 ---- a/tests/nsyscalls.c -+++ b/tests/nsyscalls.c -@@ -62,18 +62,18 @@ test_syscall(const unsigned long nr) - - #ifdef LINUX_MIPSO32 - printf("syscall(%#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx)" -- " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT, -- a[0], a[1], a[2], a[3], a[4], a[5], rc); -+ " = %s\n", nr | SYSCALL_BIT, -+ a[0], a[1], a[2], a[3], a[4], a[5], sprintrc(rc)); - #else - printf("syscall_%#lx(%#llx, %#llx, %#llx, %#llx, %#llx, %#llx)" -- " = %ld ENOSYS (%m)\n", nr | SYSCALL_BIT, -+ " = %s\n", nr | SYSCALL_BIT, - (unsigned long long) a[0], - (unsigned long long) a[1], - (unsigned long long) a[2], - (unsigned long long) a[3], - (unsigned long long) a[4], - (unsigned long long) a[5], -- rc); -+ sprintrc(rc)); - #endif - } - --- -2.18.2 - diff --git a/0100-Wire-up-rseq-syscall-on-architectures-that-use-gener.patch b/0100-Wire-up-rseq-syscall-on-architectures-that-use-gener.patch deleted file mode 100644 index d53e2e5..0000000 --- a/0100-Wire-up-rseq-syscall-on-architectures-that-use-gener.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0b051a218d5e7e51677c26c691dcf619a7d894e9 Mon Sep 17 00:00:00 2001 -From: "Dmitry V. Levin" -Date: Mon, 11 Feb 2019 23:35:07 +0000 -Subject: [PATCH] Wire up rseq syscall on architectures that use generic - unistd.h - -* linux/32/syscallent.h [293]: Wire up rseq syscall introduced by linux -commit v4.19-rc1~109^2~47. -* linux/64/syscallent.h [293]: Likewise. -* NEWS: Mention this. ---- - NEWS | 2 ++ - linux/32/syscallent.h | 1 + - linux/64/syscallent.h | 1 + - 3 files changed, 4 insertions(+) - -Index: strace-4.24/linux/32/syscallent.h -=================================================================== ---- strace-4.24.orig/linux/32/syscallent.h 2019-06-13 01:05:32.297055881 +0200 -+++ strace-4.24/linux/32/syscallent.h 2019-06-13 01:05:42.887824722 +0200 -@@ -283,6 +283,7 @@ - [290] = { 1, 0, SEN(pkey_free), "pkey_free" }, - [291] = { 5, TD|TF|TSTA, SEN(statx), "statx" }, - [292] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" }, -+[293] = { 4, 0, SEN(rseq), "rseq" }, - - #undef sys_ARCH_mmap - #undef ARCH_WANT_SYNC_FILE_RANGE2 -Index: strace-4.24/linux/64/syscallent.h -=================================================================== ---- strace-4.24.orig/linux/64/syscallent.h 2019-06-13 01:05:32.297055881 +0200 -+++ strace-4.24/linux/64/syscallent.h 2019-06-13 01:05:42.888824700 +0200 -@@ -276,3 +276,4 @@ - [290] = { 1, 0, SEN(pkey_free), "pkey_free" }, - [291] = { 5, TD|TF|TSTA, SEN(statx), "statx" }, - [292] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" }, -+[293] = { 4, 0, SEN(rseq), "rseq" }, diff --git a/0101-Wire-up-kexec_file_load-syscall-on-architectures-tha.patch b/0101-Wire-up-kexec_file_load-syscall-on-architectures-tha.patch deleted file mode 100644 index 3bf9c97..0000000 --- a/0101-Wire-up-kexec_file_load-syscall-on-architectures-tha.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 898f0ad0bc498c45734bc95917b74cfdc6466c26 Mon Sep 17 00:00:00 2001 -From: "Dmitry V. Levin" -Date: Mon, 11 Feb 2019 23:35:07 +0000 -Subject: [PATCH] Wire up kexec_file_load syscall on architectures that use - generic unistd.h - -* linux/32/syscallent.h [294]: Wire up kexec_file_load syscall -introduced by linux commit v5.0-rc1~35^2~41^2~15. -* linux/64/syscallent.h [294]: Likewise. -* NEWS: Mention this. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1676045 ---- - NEWS | 2 +- - linux/32/syscallent.h | 1 + - linux/64/syscallent.h | 1 + - 3 files changed, 3 insertions(+), 1 deletion(-) - -Index: strace-4.24/linux/32/syscallent.h -=================================================================== ---- strace-4.24.orig/linux/32/syscallent.h 2019-06-13 01:05:42.887824722 +0200 -+++ strace-4.24/linux/32/syscallent.h 2019-06-13 01:06:00.405442367 +0200 -@@ -284,6 +284,7 @@ - [291] = { 5, TD|TF|TSTA, SEN(statx), "statx" }, - [292] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" }, - [293] = { 4, 0, SEN(rseq), "rseq" }, -+[294] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, - - #undef sys_ARCH_mmap - #undef ARCH_WANT_SYNC_FILE_RANGE2 -Index: strace-4.24/linux/64/syscallent.h -=================================================================== ---- strace-4.24.orig/linux/64/syscallent.h 2019-06-13 01:05:42.888824700 +0200 -+++ strace-4.24/linux/64/syscallent.h 2019-06-13 01:06:00.405442367 +0200 -@@ -277,3 +277,4 @@ - [291] = { 5, TD|TF|TSTA, SEN(statx), "statx" }, - [292] = { 6, 0, SEN(io_pgetevents), "io_pgetevents" }, - [293] = { 4, 0, SEN(rseq), "rseq" }, -+[294] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, diff --git a/0167-print_ifindex-fix-IFNAME_QUOTED_SZ-definition.patch b/0167-print_ifindex-fix-IFNAME_QUOTED_SZ-definition.patch new file mode 100644 index 0000000..9f970da --- /dev/null +++ b/0167-print_ifindex-fix-IFNAME_QUOTED_SZ-definition.patch @@ -0,0 +1,50 @@ +From e27b06773eaf5c0307bcc5637d7457be9be1e6ea Mon Sep 17 00:00:00 2001 +From: Eugene Syromyatnikov +Date: Wed, 1 Dec 2021 17:11:02 +0100 +Subject: [PATCH] print_ifindex: fix IFNAME_QUOTED_SZ definition + +sizeof(IFNAMSIZ) instead of IFNAMSIZ was mistakenly used +for IFNAME_QUOTED_SZ initial definition in commit v4.23~87 +"print_ifindex: respect xlat style settings". + +* src/print_ifindex.c (IFNAME_QUOTED_SZ): Use IFNAMSIZ +instead of sizeof(IFNAMSIZ). +* NEWS: Mention it. + +Reported-by: Paulo Andrade +Suggested-by: Paulo Andrade +Fixes: v4.23~87 "print_ifindex: respect xlat style settings" +References: https://bugzilla.redhat.com/show_bug.cgi?id=2028146 +--- + NEWS | 4 ++++ + src/print_ifindex.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +Index: strace-4.24/NEWS +=================================================================== +--- strace-4.24.orig/NEWS 2022-01-06 16:40:29.277122809 +0100 ++++ strace-4.24/NEWS 2022-01-06 16:41:02.803843038 +0100 +@@ -21,6 +21,10 @@ + * Fixed build in exotic systemd-nspawn based environments. + * Fixed build on s390 with kernel headers that do not contain Linux commit + v3.10-rc1~201^2~11. ++ * Fixed insufficient buffer size used for network interface name printing, ++ that previously led to assertions on attempts of printing interface names ++ that require quoting, for example, names longer than 4 characters in -xx ++ mode (addresses RHBZ bug #2028146). + + Noteworthy changes in release 4.23 (2018-06-14) + =============================================== +Index: strace-4.24/print_ifindex.c +=================================================================== +--- strace-4.24.orig/print_ifindex.c 2022-01-06 16:40:48.594961607 +0100 ++++ strace-4.24/print_ifindex.c 2022-01-06 16:41:10.107782089 +0100 +@@ -13,7 +13,7 @@ + + # define INI_PFX "if_nametoindex(" + # define INI_SFX ")" +-# define IFNAME_QUOTED_SZ (sizeof(IFNAMSIZ) * 4 + 3) ++# define IFNAME_QUOTED_SZ (IFNAMSIZ * 4 + 3) + + static const char * + get_ifname(const unsigned int ifindex) diff --git a/1001-tests-increase-the-child-stack-size-in-some-tests-that-invoke-clone.patch b/1001-tests-increase-the-child-stack-size-in-some-tests-that-invoke-clone.patch deleted file mode 100644 index 9e1c6d7..0000000 --- a/1001-tests-increase-the-child-stack-size-in-some-tests-that-invoke-clone.patch +++ /dev/null @@ -1,146 +0,0 @@ -From 7b942af2f7b3de9bb5cefd9a026a30af899cea57 Mon Sep 17 00:00:00 2001 -From: "Dmitry V. Levin" -Date: Sun, 29 Dec 2019 22:25:26 +0000 -Subject: [PATCH] tests: increase the child stack size in some tests that - invoke clone - -Increase the child stack size from the half page size to the full page -size in those few tests that invoke clone syscall. - -The former size appears to be insufficient in some build setups. -For example, clang 7 on Ubuntu bionic x86_64 makes ioctl_nsfs test fail -due to child process segfaults. - -* tests/clone_parent.c (child_stack_size, clone): Remove. -(do_clone): New macro. -(main): Use it. -* tests/clone_ptrace.c: Likewise. -* tests/ioctl_nsfs.c (child_stack_size, clone): Remove. -(do_clone): New macro. -(test_user_namespace): Use it. ---- - tests/clone_parent.c | 17 +++++++++++------ - tests/clone_ptrace.c | 17 +++++++++++------ - tests/ioctl_nsfs.c | 21 ++++++++++++++------- - 3 files changed, 36 insertions(+), 19 deletions(-) - -diff --git a/tests/clone_parent.c b/tests/clone_parent.c -index 111f98d101..8b38d4773a 100644 ---- a/tests/clone_parent.c -+++ b/tests/clone_parent.c -@@ -23,19 +23,24 @@ child(void *const arg) - return 42; - } - --#define child_stack_size (get_page_size() / 2) -- - #ifdef IA64 - extern int __clone2(int (*)(void *), void *, size_t, int, void *, ...); --# define clone(fn, child_stack, flags, arg) \ -- __clone2(fn, child_stack, child_stack_size, flags, arg) -+# define do_clone(fn_, stack_, size_, flags_, arg_, ...) \ -+ __clone2((fn_), (stack_), (size_), (flags_), (arg_), ## __VA_ARGS__) -+#else -+# define do_clone(fn_, stack_, size_, flags_, arg_, ...) \ -+ clone((fn_), (stack_), (flags_), (arg_), ## __VA_ARGS__) - #endif - - int - main(void) - { -- const pid_t pid = clone(child, tail_alloc(child_stack_size), -- CLONE_PARENT | SIGCHLD, 0); -+ const unsigned long child_stack_size = get_page_size(); -+ void *const child_stack = -+ tail_alloc(child_stack_size * 2) + child_stack_size; -+ -+ const pid_t pid = do_clone(child, child_stack, child_stack_size, -+ CLONE_PARENT | SIGCHLD, 0); - if (pid < 0) - perror_msg_and_fail("clone"); - -diff --git a/tests/clone_ptrace.c b/tests/clone_ptrace.c -index ee366ab936..50b50bb364 100644 ---- a/tests/clone_ptrace.c -+++ b/tests/clone_ptrace.c -@@ -34,12 +34,13 @@ child(void *const arg) - return 0; - } - --#define child_stack_size (get_page_size() / 2) -- - #ifdef IA64 - extern int __clone2(int (*)(void *), void *, size_t, int, void *, ...); --# define clone(fn, child_stack, flags, arg) \ -- __clone2(fn, child_stack, child_stack_size, flags, arg) -+# define do_clone(fn_, stack_, size_, flags_, arg_, ...) \ -+ __clone2((fn_), (stack_), (size_), (flags_), (arg_), ## __VA_ARGS__) -+#else -+# define do_clone(fn_, stack_, size_, flags_, arg_, ...) \ -+ clone((fn_), (stack_), (flags_), (arg_), ## __VA_ARGS__) - #endif - - int -@@ -52,8 +53,12 @@ main(void) - if (sigprocmask(SIG_UNBLOCK, &mask, NULL)) - perror_msg_and_fail("sigprocmask"); - -- const pid_t pid = clone(child, tail_alloc(child_stack_size), -- CLONE_PTRACE | SIGCHLD, 0); -+ const unsigned long child_stack_size = get_page_size(); -+ void *const child_stack = -+ tail_alloc(child_stack_size * 2) + child_stack_size; -+ -+ const pid_t pid = do_clone(child, child_stack, child_stack_size, -+ CLONE_PTRACE | SIGCHLD, 0); - if (pid < 0) - perror_msg_and_fail("clone"); - -diff --git a/tests/ioctl_nsfs.c b/tests/ioctl_nsfs.c -index 74dbe6e948..fd82b4adb9 100644 ---- a/tests/ioctl_nsfs.c -+++ b/tests/ioctl_nsfs.c -@@ -86,22 +86,27 @@ child(void *arg) - - #ifdef IA64 - extern int __clone2(int (*)(void *), void *, size_t, int, void *, ...); --# define clone(fn, child_stack, flags, arg) \ -- __clone2(fn, child_stack, get_page_size() / 2, flags, arg) -+# define do_clone(fn_, stack_, size_, flags_, arg_, ...) \ -+ __clone2((fn_), (stack_), (size_), (flags_), (arg_), ## __VA_ARGS__) -+#else -+# define do_clone(fn_, stack_, size_, flags_, arg_, ...) \ -+ clone((fn_), (stack_), (flags_), (arg_), ## __VA_ARGS__) - #endif - - static void - test_user_namespace(void) - { -- pid_t pid; - int pipefd[2]; -- int status; -- - if (pipe(pipefd)) - perror_msg_and_fail("pipe"); - -- pid = clone(child, tail_alloc(get_page_size() / 2), -- CLONE_NEWUSER | CLONE_UNTRACED | SIGCHLD, pipefd); -+ const unsigned long child_stack_size = get_page_size(); -+ void *const child_stack = -+ tail_alloc(child_stack_size * 2) + child_stack_size; -+ -+ const pid_t pid = do_clone(child, child_stack, child_stack_size, -+ CLONE_NEWUSER | CLONE_UNTRACED | SIGCHLD, -+ pipefd); - if (pid == -1) { - perror("clone"); - return; -@@ -109,6 +114,8 @@ test_user_namespace(void) - close(pipefd[0]); - test_clone(pid); - close(pipefd[1]); -+ -+ int status; - if (wait(&status) != pid) { - perror_msg_and_fail("wait"); - } else if (status != 0) { diff --git a/strace-b89a69dec27cf638df0e17db80ed937c3e1abf77.patch b/strace-b89a69dec27cf638df0e17db80ed937c3e1abf77.patch deleted file mode 100644 index 34e3ad0..0000000 --- a/strace-b89a69dec27cf638df0e17db80ed937c3e1abf77.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Naurp a/xlat/v4l2_control_id_bases.h b/xlat/v4l2_control_id_bases.h ---- a/xlat/v4l2_control_id_bases.h 2018-08-14 00:44:25.000000000 +0000 -+++ b/xlat/v4l2_control_id_bases.h 2019-05-23 12:21:15.396137688 +0000 -@@ -31,12 +31,16 @@ DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE - #else - # define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE + 0x1050) - #endif -+#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE -+# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE -+# undef V4L2_CID_USER_IMX_BASE -+#endif - #if defined(V4L2_CID_USER_IMX_BASE) || (defined(HAVE_DECL_V4L2_CID_USER_IMX_BASE) && HAVE_DECL_V4L2_CID_USER_IMX_BASE) - DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE --static_assert((V4L2_CID_USER_IMX_BASE) == ((V4L2_CID_BASE + 0x1090)), "V4L2_CID_USER_IMX_BASE != (V4L2_CID_BASE + 0x1090)"); -+static_assert((V4L2_CID_USER_IMX_BASE) == ((V4L2_CID_BASE + 0x10b0)), "V4L2_CID_USER_IMX_BASE != (V4L2_CID_BASE + 0x10b0)"); - DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE - #else --# define V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x1090) -+# define V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x10b0) - #endif - #if defined(V4L2_CID_MPEG_BASE) || (defined(HAVE_DECL_V4L2_CID_MPEG_BASE) && HAVE_DECL_V4L2_CID_MPEG_BASE) - DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE -@@ -146,6 +150,21 @@ const struct xlat v4l2_control_id_bases[ - XLAT(V4L2_CID_USER_MEYE_BASE), - XLAT(V4L2_CID_USER_BTTV_BASE), - XLAT(V4L2_CID_USER_TI_VPE_BASE), -+#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE -+# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE -+/* -+* Linux kernel commit v4.18-rc2-106-g421860b9d47053badce4b247576fa48df9ab4c48 -+* has changed the value of V4L2_CID_USER_IMX_BASE constant introduced -+* by commit v4.13-rc1~141^2~121 because the old value was already used -+* by V4L2_CID_USER_MAX217X_BASE. -+* This is of course an ABI breakage that affects Linux kernels starting -+* with 4.13 and up to 4.18, as well as their LTS derivatives. -+* Since the imx driver didn't provide any public control ID definitions, -+* it looks like the best way to handle this situation is to pretend that -+* the old value of V4L2_CID_USER_IMX_BASE didn't exist. -+*/ -+# undef V4L2_CID_USER_IMX_BASE -+#endif - XLAT(V4L2_CID_USER_IMX_BASE), - XLAT(V4L2_CID_MPEG_BASE), - XLAT(V4L2_CID_MPEG_CX2341X_BASE), -diff -Naurp a/xlat/v4l2_control_id_bases.in b/xlat/v4l2_control_id_bases.in ---- a/xlat/v4l2_control_id_bases.in 2018-05-06 15:34:41.000000000 +0000 -+++ b/xlat/v4l2_control_id_bases.in 2019-05-23 12:21:01.146061843 +0000 -@@ -2,7 +2,22 @@ V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | - V4L2_CID_USER_MEYE_BASE (V4L2_CID_BASE + 0x1000) - V4L2_CID_USER_BTTV_BASE (V4L2_CID_BASE + 0x1010) - V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_BASE + 0x1050) --V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x1090) -+#ifndef STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE -+# define STRACE_WORKAROUND_FOR_V4L2_CID_USER_IMX_BASE -+/* -+ * Linux kernel commit v4.18-rc2-106-g421860b9d47053badce4b247576fa48df9ab4c48 -+ * has changed the value of V4L2_CID_USER_IMX_BASE constant introduced -+ * by commit v4.13-rc1~141^2~121 because the old value was already used -+ * by V4L2_CID_USER_MAX217X_BASE. -+ * This is of course an ABI breakage that affects Linux kernels starting -+ * with 4.13 and up to 4.18, as well as their LTS derivatives. -+ * Since the imx driver didn't provide any public control ID definitions, -+ * it looks like the best way to handle this situation is to pretend that -+ * the old value of V4L2_CID_USER_IMX_BASE didn't exist. -+ */ -+# undef V4L2_CID_USER_IMX_BASE -+#endif -+V4L2_CID_USER_IMX_BASE (V4L2_CID_BASE + 0x10b0) - V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) - V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) - V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100) diff --git a/strace.spec b/strace.spec index f20f4ef..8bccdb2 100644 --- a/strace.spec +++ b/strace.spec @@ -1,8 +1,7 @@ -%define anolis_release .0.1 Summary: Tracks and displays system calls associated with a running process Name: strace Version: 4.24 -Release: 6%{anolis_release}%{?dist} +Release: 7%{?dist} # The test suite is GPLv2+, all the rest is LGPLv2.1+. License: LGPL-2.1+ and GPL-2.0+ Group: Development/Debuggers @@ -147,41 +146,14 @@ Patch43: 0043-tests-fix-expected-output-for-some-ipc-tests.patch # v5.4~49 "tests: fix -a argument in ipc_msgbuf-Xraw test" Patch44: 0044-tests-fix-a-argument-in-ipc_msgbuf-Xraw-test.patch -## Wire up rseq and kexec_file_load in order to avoid kexec_file_load -## test failure on aarch64. Addresses https://bugzilla.redhat.com/1676045 -## ("strace: FTBFS in Fedora rawhide/f30"). -# v5.0~62 "Wire up rseq syscall on architectures that use generic unistd.h" -Patch100: 0100-Wire-up-rseq-syscall-on-architectures-that-use-gener.patch -# v5.0~61 "Wire up kexec_file_load syscall on architectures that use generic unistd.h" -Patch101: 0101-Wire-up-kexec_file_load-syscall-on-architectures-tha.patch +# v5.15~1 "print_ifindex: fix IFNAME_QUOTED_SZ definition" +Patch167: 0167-print_ifindex-fix-IFNAME_QUOTED_SZ-definition.patch ## RHEL-only: headers on some builders do not provide O_TMPFILE Patch200: 0200-strace-provide-O_TMPFILE-fallback-definition.patch ## RHEL-only: aarch64 brew builders are extremely slow on qual_fault.test Patch201: 0201-limit-qual_fault-scope-on-aarch64.patch -Patch9999: strace-b89a69dec27cf638df0e17db80ed937c3e1abf77.patch - -# Add by Anolis -Patch1000: 0001-strace-anolis-fix-nsyscalls-check-error.patch - -# Increase the child stack size from the half page size to the full page -# size in those few tests that invoke clone syscall. -# -# The former size appears to be insufficient in some build setups. -# For example, clang 7 on Ubuntu bionic x86_64 makes ioctl_nsfs test fail -# due to child process segfaults. -# -# * tests/clone_parent.c (child_stack_size, clone): Remove. -# (do_clone): New macro. -# (main): Use it. -# * tests/clone_ptrace.c: Likewise. -# * tests/ioctl_nsfs.c (child_stack_size, clone): Remove. -# (do_clone): New macro. -# (test_user_namespace): Use it. -# https://github.com/strace/strace/commit/7b942af2f7b3de9bb5cefd9a026a30af899cea57.patch -Patch1001: 1001-tests-increase-the-child-stack-size-in-some-tests-that-invoke-clone.patch -# End # In the past we had a separate strace64 package, these days the # stndard 64 bit build provides that functionality. For tracing @@ -265,20 +237,11 @@ binary supports tracing of 32-bit processes as well. %patch41 -p1 %patch43 -p1 %patch44 -p1 - -%patch100 -p1 -%patch101 -p1 +%patch167 -p1 %patch200 -p1 %patch201 -p1 -%ifarch %{arm} -%patch9999 -p1 -%endif - -%patch1000 -p1 -%patch1001 -p1 - echo -n %version-%release > .tarball-version echo -n 2019 > .year echo -n 2019-08-01 > .strace.1.in.date @@ -349,16 +312,27 @@ chmod u+x tests/*.test tests-m32/*.test tests-mx32/*.test %{buildroot}%{_bindir}/strace -V +uname_r="$(uname -r)" # Skip tests on s390x el6 kernel, test failures there are covered # by the following issues: # * https://bugzilla.redhat.com/show_bug.cgi?id=1220802 # * Absence of Linux commit v3.2-rc1~109^2~34 -uname_r="$(uname -r)" if [ "x${uname_r#2.6.32}" != "x${uname_r}" ] && \ [ "x${uname_r%s390x}" != "x${uname_r}" ] then echo "Skipping tests, kernel (${uname_r}) is too broken" -%ifnarch %{arm} +%ifarch s390 +# Skip tests on s390: +# * strace test suite used to rely too much on the fact that the last page +# is unreadable, and apparently it is readable on s390 compat +# * 16-bit set*id calls seem to be broken: +# setugid.c:65: setuid(0xffff03e5) = -1 != 0: Operation not permitted +# setresugid.c:79: setresgid(0xffff0087, 0x87, 0x87): Operation not permitted +# (at least v4.16-rc1~117^2~1 is missing) +elif [ "x${uname_r%s390}" != "x${uname_r}" -o "x${uname_r%s390x}" != "x${uname_r}" ] +then + echo "Skipping tests, test suite and kernel (${uname_r}) are too broken" +%endif else # We have to limit concurrent execution of tests as some time-sensitive # tests start to fail if the reported time is way too off @@ -368,7 +342,6 @@ else find tests* -type f -name '*.log' -print0 | xargs -r0 grep -H '^KERNEL BUG:' -- ||: echo 'END OF TEST SUITE INFORMATION' -%endif fi %clean @@ -388,12 +361,9 @@ rm -rf %{buildroot} %endif %changelog -* Wed Feb 03 2021 Mahailiang - 4.24-6.0.1 -- Fix nsyscalls check error -- Sync from https://github.com/strace/strace (version 5.10) -- Fix failed tests clone_ptrace, ioctl_nsfs.gen: - 7b942af "tests: increase the child stack size in some tests that invoke clone" -- Wire up rseq and kexec_file_load on aarch64 (#1676045). +* Wed Jan 05 2022 Eugene Syromiatnikov - 4.24-7 +- Fix incorrect ifname printing buffer size (#2028146): + e27b0677 "print_ifindex: fix IFNAME_QUOTED_SZ definition". * Thu Apr 16 2020 Eugene Syromiatnikov - 4.24-6 - Fix expected alignment for IPC tests (#1795261): -- Gitee