lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251025160905.3857885-396-sashal@kernel.org>
Date: Sat, 25 Oct 2025 12:00:27 -0400
From: Sasha Levin <sashal@...nel.org>
To: patches@...ts.linux.dev,
	stable@...r.kernel.org
Cc: "Matthieu Baerts (NGI0)" <matttbe@...nel.org>,
	Geliang Tang <geliang@...nel.org>,
	Jakub Kicinski <kuba@...nel.org>,
	Sasha Levin <sashal@...nel.org>,
	martineau@...nel.org,
	netdev@...r.kernel.org,
	mptcp@...ts.linux.dev
Subject: [PATCH AUTOSEL 6.17-6.12] selftests: mptcp: join: allow more time to send ADD_ADDR

From: "Matthieu Baerts (NGI0)" <matttbe@...nel.org>

[ Upstream commit e2cda6343bfe459c3331db5afcd675ab333112dd ]

When many ADD_ADDR need to be sent, it can take some time to send each
of them, and create new subflows. Some CIs seem to occasionally have
issues with these tests, especially with "debug" kernels.

Two subtests will now run for a slightly longer time: the last two where
3 or more ADD_ADDR are sent during the test.

Reviewed-by: Geliang Tang <geliang@...nel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@...nel.org>
Link: https://patch.msgid.link/20250907-net-next-mptcp-add_addr-retrans-adapt-v1-3-824cc805772b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---

LLM Generated explanations, may be completely bogus:

YES

- What changed: The patch slows two MPTCP selftests that signal three
  addresses to reduce flakiness. It injects `speed=slow` for the “signal
  addresses” and “signal invalid addresses” subtests so `run_tests` runs
  in slow mode:
  - tools/testing/selftests/net/mptcp/mptcp_join.sh:2271-2272 sets
    `speed=slow` before `run_tests` in the “signal addresses” block.
  - tools/testing/selftests/net/mptcp/mptcp_join.sh:2284-2285 sets
    `speed=slow` before `run_tests` in the “signal invalid addresses”
    block.

- How it works: `speed=slow` is consumed by `do_transfer()` which maps
  it to `-r 50` for `mptcp_connect`:
  - Default/dispatch:
    tools/testing/selftests/net/mptcp/mptcp_join.sh:953 defines `local
    speed=${speed:-"fast"}` and at 967-972 maps `fast`→`-j`, `slow`→`-r
    50`, or numeric speed→`-r <num>`.
  - mptcp_connect semantics: the `-r` option enables “slow mode,
    limiting each write to num bytes,” giving the protocol time to
    exchange ADD_ADDR and create subflows
    (tools/testing/selftests/net/mptcp/mptcp_connect.c:132, parsed in
    1426 and handled in the ‘r’ case 1444-1450).

- Why it’s needed: With three or more ADD_ADDR to send, debug kernels
  and slower CI runners can time out or not complete subflow setup
  before data transfer finishes. Slowing writes increases the window for
  address signaling and subflow establishment, improving determinism.
  This aligns with existing practice elsewhere in the script where many
  subtests already run with `speed=slow` for similar reasons (e.g.,
  numerous `speed=slow` calls throughout the file).

- Scope and risk:
  - Test-only: Changes are confined to
    `tools/testing/selftests/net/mptcp/mptcp_join.sh` and do not touch
    kernel code paths or ABIs.
  - Minimal and contained: Two call sites adjusted; no logic or
    expectations changed, only pacing.
  - Low regression risk: Only increases runtime slightly for two
    subtests; expected counts remain the same (e.g., still `chk_join_nr
    3 3 3` and `chk_add_nr 3 3` in
    tools/testing/selftests/net/mptcp/mptcp_join.sh:2273-2274; and
    unchanged checks after the invalid addresses case at 2286-2288).

- Stable-policy fit:
  - Fixes test flakiness affecting CI/users running stable selftests
    (practical impact for validation).
  - No new features or architectural changes; very small diff; conforms
    to stable rules for low-risk test fixes.
  - No “Cc: stable” tag, but the change is a clear reliability fix for
    selftests, which stable trees commonly accept to keep test suites
    meaningful.

Given it’s a tiny, isolated selftest reliability improvement with no
kernel-side risk and tangible benefit for CI stability, it is suitable
for backporting.

 tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 8e92dfead43bf..fed14a281a6d9 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -2151,7 +2151,8 @@ signal_address_tests()
 		pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
 		pm_nl_add_endpoint $ns1 10.0.4.1 flags signal
 		pm_nl_set_limits $ns2 3 3
-		run_tests $ns1 $ns2 10.0.1.1
+		speed=slow \
+			run_tests $ns1 $ns2 10.0.1.1
 		chk_join_nr 3 3 3
 		chk_add_nr 3 3
 	fi
@@ -2163,7 +2164,8 @@ signal_address_tests()
 		pm_nl_add_endpoint $ns1 10.0.3.1 flags signal
 		pm_nl_add_endpoint $ns1 10.0.14.1 flags signal
 		pm_nl_set_limits $ns2 3 3
-		run_tests $ns1 $ns2 10.0.1.1
+		speed=slow \
+			run_tests $ns1 $ns2 10.0.1.1
 		join_syn_tx=3 \
 			chk_join_nr 1 1 1
 		chk_add_nr 3 3
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ