From b6406287e6bfdea6bc45c15e8ea7d1bf7b5120b2 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 11 Feb 2026 15:38:20 +0100 Subject: [PATCH] Additional riscv64 build fixes Resolves: RHEL-149797 Signed-off-by: Andrea Bolognani --- ...y_syscall_info-on-riscv64-with-kerne.patch | 48 +++++++++++++++++++ strace.spec | 9 +++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 0004-tests-Skip-legacy_syscall_info-on-riscv64-with-kerne.patch diff --git a/0004-tests-Skip-legacy_syscall_info-on-riscv64-with-kerne.patch b/0004-tests-Skip-legacy_syscall_info-on-riscv64-with-kerne.patch new file mode 100644 index 0000000..794d1d4 --- /dev/null +++ b/0004-tests-Skip-legacy_syscall_info-on-riscv64-with-kerne.patch @@ -0,0 +1,48 @@ +From 82893b2fc721ec6f6b76b131775f0470b97f8d15 Mon Sep 17 00:00:00 2001 +From: Andrea Bolognani +Date: Sat, 24 Jan 2026 11:25:44 +0100 +Subject: [PATCH] tests: Skip legacy_syscall_info on riscv64 with kernel + 6.6.49+ too + +Back in late 2024, strace commit ba41bc0da4b841d9 made it so that +this test is skipped when running on kernel 6.11+, which is the +first release containing kernel commit 61119394631f219e ("riscv: +entry: always initialize regs->a0 to -ENOSYS"), the one that +broke the legacy API on riscv64. + +What I failed to realize at the time is that the change had also +been backported to the 6.6 tree as kernel commit 84557cd61182edf7, +part of 6.6.49 stable kernel release. So we need to update our +check to take that into account too, otherwise machines running +an up-to-date LTS kernel will be unable to successfully build +strace. + +This theoretically makes us lose coverage for the 6.7 - 6.10 +kernel range, but in reality 99% of riscv64 machines are running +either the latest upstream kernel or a vendor kernel based on 6.6, +so nothing really changes in practice. + +Signed-off-by: Andrea Bolognani +--- + tests/legacy_syscall_info.test | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tests/legacy_syscall_info.test b/tests/legacy_syscall_info.test +index 11612454c..88e9d20f8 100755 +--- a/tests/legacy_syscall_info.test ++++ b/tests/legacy_syscall_info.test +@@ -12,9 +12,10 @@ + . "${srcdir=.}/init.sh" + + # The legacy API is broken on riscv64 with kernel 6.11+ ++# The same change was also backported into the 6.6 stable tree + # https://github.com/strace/strace/issues/315 + [ "$(uname -m)" != "riscv64" ] || +- require_max_kernel_version_or_skip 6.11 ++ require_max_kernel_version_or_skip 6.6.49 + + check_prog grep + $STRACE -d -enone / > /dev/null 2> "$LOG" ||: +-- +2.53.0 + diff --git a/strace.spec b/strace.spec index 4096f49..69a18c0 100644 --- a/strace.spec +++ b/strace.spec @@ -1,7 +1,7 @@ Summary: Tracks and displays system calls associated with a running process Name: strace Version: 6.12 -Release: 3%{?dist} +Release: 4%{?dist} # The test suite is GPLv2+, the bundled headers are GPLv2 with Linux syscall # exception, all the rest is LGPLv2.1+. %if 0%{?fedora} >= 35 || 0%{?centos} >= 9 || 0%{?rhel} >= 9 @@ -114,6 +114,9 @@ Patch0002: 0002-tests-Reduce-expected-precision-for-relative-timesta.patch # Origin: https://github.com/strace/strace/commit/1e4f282ba6c1fea8b689aa74affbedddbb799d21 Patch0003: 0003-tests-group_req-fix-compilation-warnings.patch +# Origin: https://github.com/strace/strace/commit/82893b2fc721ec6f6b76b131775f0470b97f8d15 +Patch0004: 0004-tests-Skip-legacy_syscall_info-on-riscv64-with-kerne.patch + BuildRequires: xz %else Source: strace-%{version}.tar.gz @@ -171,6 +174,7 @@ echo -n 2022-01-01 > doc/.strace-log-merge.1.in.date %patch 0001 -p1 %patch 0002 -p1 %patch 0003 -p1 +%patch 0004 -p1 %build echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION' @@ -222,6 +226,9 @@ fi %{_mandir}/man1/* %changelog +* Sun Feb 15 2026 Andrea Bolognani - 6.12-4 +- Additional riscv64 build fixes (RHEL-149797) + * Wed Dec 17 2025 Michael Petlan - 6.12.3 - Fix incorrect inet_pton call discovered by fortification (RHEL-136502)