linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6
@ 2026-08-03 16:16 Matthieu Baerts (NGI0)
  2026-08-03 16:16 ` [PATCH net v2 5/8] selftests: mptcp: join: mark tests with data corruption as failed Matthieu Baerts (NGI0)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-08-03 16:16 UTC (permalink / raw)
  To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman
  Cc: netdev, mptcp, linux-kernel, Matthieu Baerts (NGI0), stable,
	Davide Caratti, Florian Westphal, Christoph Paasch, Qing Luo,
	Gang Yan, Shuah Khan, linux-kselftest, Shardul Bankar,
	Kishen Maloor, Wyatt Feng, Yuan Tan, Yifan Wu, Juefei Pu,
	Zhengchuan Liang, Xin Liu, Ren Wei, Dmytro Shytyi

Here are various unrelated fixes:

- Patches 1-3: harden incoming MPTCP suboptions parsing by rejecting
  non-combinable ones. Patch 3 removes unreachable code after patch 2
  added here for consistency, and to reduce comments from AI reviews.
  Fixes for v5.6.

- Patch 4: fix a data race in the ADD_ADDR timer callback. A fix for
  v5.13.

- Patch 5: correctly catch data corruption during the MPTCP join
  selftest by marking tests as failed, instead of only printing a
  warning. A fix for v5.18.

- Patch 6: fix a leak with the userspace ADD_ADDR list in case of race
  condition during teardown. A fix for v5.19.

- Patch 7: deal with MPTFO with a valid token, but no data in the SYN. A
  fix for v6.2.

- Patch 8: reclaim forward-allocated memory in case of error on the
  receive side. A fix for v6.19.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Changes in v2:
- Patches 1, 3, 6: new.
- Patch 2: handle MP_FASTCLOSE & DSS case.
- Patches 2, 4, 7: updated commit message to reply to AI reviews.
- Patch 8: start comment on the same line as the opening /*.
- Note: the title of this series has not been updated: the fixes are
  obviously for the next RC.
- Also, apart from patch 3, the different fixes are independent: in case
  of new issues discovered at review time, valid fixes can already been
  picked up, not to be blocked by unrelated patches.
- Link to v1: https://patch.msgid.link/20260728-net-mptcp-misc-fixes-7-2-rc6-v1-0-f7e2d229159d@kernel.org

---
Gang Yan (1):
      selftests: mptcp: join: mark tests with data corruption as failed

Matthieu Baerts (NGI0) (3):
      mptcp: options: reset DSS fields in case of unexpected size
      mptcp: avoid combining some incoming suboptions
      mptcp: remove MPC && MPJ check

Paolo Abeni (1):
      mptcp: reclaim forward-allocated memory on RX path errors

Qing Luo (1):
      mptcp: pm: fix data race in add_addr timer callback

Shardul Bankar (1):
      mptcp: pm: fix memory leak from alloc-during-teardown race

Wyatt Feng (1):
      mptcp: fastopen: only mark MPTFO subflows with SYN data

 net/mptcp/fastopen.c                            |  7 +--
 net/mptcp/options.c                             | 67 ++++++++++++++++++++++++-
 net/mptcp/pm.c                                  | 19 +++++--
 net/mptcp/pm_userspace.c                        |  4 ++
 net/mptcp/protocol.c                            |  6 +++
 net/mptcp/protocol.h                            |  8 +--
 net/mptcp/subflow.c                             |  5 --
 tools/testing/selftests/net/mptcp/mptcp_join.sh |  4 +-
 8 files changed, 101 insertions(+), 19 deletions(-)
---
base-commit: af39eb111ce6b5eba9c08513b62c4868eb7e7fd5
change-id: 20260728-net-mptcp-misc-fixes-7-2-rc6-22213c66ef75

Best regards,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net v2 5/8] selftests: mptcp: join: mark tests with data corruption as failed
  2026-08-03 16:16 [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6 Matthieu Baerts (NGI0)
@ 2026-08-03 16:16 ` Matthieu Baerts (NGI0)
  2026-08-05 11:29 ` [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6 Matthieu Baerts
  2026-08-06 15:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-08-03 16:16 UTC (permalink / raw)
  To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman
  Cc: netdev, mptcp, linux-kernel, Matthieu Baerts (NGI0), Gang Yan,
	stable, Shuah Khan, linux-kselftest

From: Gang Yan <yangang@kylinos.cn>

check_transfer() compares the input and output files byte-by-byte using
`cmp -l "$in" "$out" | while read ...`. Because the while-loop body runs
in a subshell (the script sets neither lastpipe nor pipefail), the
fail_test call inside it -- which sets the global ret/last_test_failed --
and the `return 1` both act on the subshell, not on check_transfer().

check_transfer() thus always falls through to `return 0`, and any data
corruption affecting only the payload (leaving the subflow/PM counters
untouched) is silently reported as PASS.

Fixes: 8117dac3e7c3 ("selftests: mptcp: add invert check in check_transfer")
Cc: stable@vger.kernel.org
Assisted-by: Codex:GLM-5.2
Signed-off-by: Gang Yan <yangang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index c0aeffd5cb71..7dc91fac4917 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -584,7 +584,7 @@ check_transfer()
 		mv "$tmpfile" "$out"
 		tmpfile=""
 	fi
-	cmp -l "$in" "$out" | while read -r i a b; do
+	while read -r i a b; do
 		local sum=$((0${a} + 0${b}))
 		if [ $check_invert -eq 0 ] || [ $sum -ne $((0xff)) ]; then
 			fail_test "$what does not match (in, out):"
@@ -595,7 +595,7 @@ check_transfer()
 		else
 			print_info "$what has inverted byte at ${i}"
 		fi
-	done
+	done < <(cmp -l "$in" "$out")
 
 	return 0
 }

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6
  2026-08-03 16:16 [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6 Matthieu Baerts (NGI0)
  2026-08-03 16:16 ` [PATCH net v2 5/8] selftests: mptcp: join: mark tests with data corruption as failed Matthieu Baerts (NGI0)
@ 2026-08-05 11:29 ` Matthieu Baerts
  2026-08-06 15:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Matthieu Baerts @ 2026-08-05 11:29 UTC (permalink / raw)
  To: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman
  Cc: netdev, mptcp, linux-kernel, stable, Davide Caratti,
	Florian Westphal, Christoph Paasch, Qing Luo, Gang Yan,
	Shuah Khan, linux-kselftest, Shardul Bankar, Kishen Maloor,
	Wyatt Feng, Yuan Tan, Yifan Wu, Juefei Pu, Zhengchuan Liang,
	Xin Liu, Ren Wei, Dmytro Shytyi

Hello,

Regarding the "funny" Clashiko's (long) comments [1]:

TL;DR: I think this series can be applied as it is.

On 03/08/2026 18:16, Matthieu Baerts (NGI0) wrote:
> Here are various unrelated fixes:
> 
> - Patches 1-3: harden incoming MPTCP suboptions parsing by rejecting
>   non-combinable ones. Patch 3 removes unreachable code after patch 2
>   added here for consistency, and to reduce comments from AI reviews.
>   Fixes for v5.6.

- Patch 1: indeed, there is another existing issue to fix. This will be
done in a follow-up patch.

- Patch 2:
 - Yes, combining some options is wrong, even if the RFC doesn't
explicitly mention that, and if there is space. As I explained in the
commit message when this happens, it is likely a buggy or bad behaviour
from the other peer, no need to try to get things working in this case.
 - No I'm not going to mention all possible wrong combinations, it is
enough to explain the pattern and give the list of allowed combined options.
 - Also, no need to insist about the same existing issue...

- Patch 3: wow, no comments :-O

> - Patch 4: fix a data race in the ADD_ADDR timer callback. A fix for
>   v5.13.

- An existing issue to fix, this will be done in a follow-up patch.

> - Patch 5: correctly catch data corruption during the MPTCP join
>   selftest by marking tests as failed, instead of only printing a
>   warning. A fix for v5.18.
> 
> - Patch 6: fix a leak with the userspace ADD_ADDR list in case of race
>   condition during teardown. A fix for v5.19.

I don't think the mentioned existing race is possible: I would need a
reproducer. Also, I don't think the commit message needs to be even
longer, and no need to change the error for the userspace daemon: it
will get the notification about the close, and it depends on how the
userspace daemon handle that, possibly in an async way, so no need to
get something better for this race case on the close side.

Also, no need to add a BUILD_BUG_ON(). This can be dealt next time a
flag is added (or on next).

> - Patch 7: deal with MPTFO with a valid token, but no data in the SYN. A
>   fix for v6.2.

Same answer as on v1 (despite the new comment in the commit message):
getting a more precise comment there doesn't have a lot of value: "doing
TFO" means having data in the SYN there. If the comment is modified,
that will certainly cause troubles during the backports.

> - Patch 8: reclaim forward-allocated memory in case of error on the
>   receive side. A fix for v6.19.
Existing issue that will be addressed by the "mptcp: out-of-order queue
pruning" series.

[1]
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260803-net-mptcp-misc-fixes-7-2-rc6-v2-0-b8f496d71664%40kernel.org

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6
  2026-08-03 16:16 [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6 Matthieu Baerts (NGI0)
  2026-08-03 16:16 ` [PATCH net v2 5/8] selftests: mptcp: join: mark tests with data corruption as failed Matthieu Baerts (NGI0)
  2026-08-05 11:29 ` [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6 Matthieu Baerts
@ 2026-08-06 15:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-06 15:50 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: martineau, geliang, davem, edumazet, kuba, pabeni, horms, netdev,
	mptcp, linux-kernel, stable, dcaratti, fw, cpaasch, luoqing,
	yangang, shuah, linux-kselftest, shardul.b, kishen.maloor,
	bronzed_45_vested, yuantan098, yifanwucs, tomapufckgml, zcliangcn,
	bird, n05ec, dmytro

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 03 Aug 2026 18:16:32 +0200 you wrote:
> Here are various unrelated fixes:
> 
> - Patches 1-3: harden incoming MPTCP suboptions parsing by rejecting
>   non-combinable ones. Patch 3 removes unreachable code after patch 2
>   added here for consistency, and to reduce comments from AI reviews.
>   Fixes for v5.6.
> 
> [...]

Here is the summary with links:
  - [net,v2,1/8] mptcp: options: reset DSS fields in case of unexpected size
    https://git.kernel.org/netdev/net/c/35772b4981f3
  - [net,v2,2/8] mptcp: avoid combining some incoming suboptions
    https://git.kernel.org/netdev/net/c/b6ee36152464
  - [net,v2,3/8] mptcp: remove MPC && MPJ check
    https://git.kernel.org/netdev/net/c/900e6d80548e
  - [net,v2,4/8] mptcp: pm: fix data race in add_addr timer callback
    https://git.kernel.org/netdev/net/c/a7aad5b69d3b
  - [net,v2,5/8] selftests: mptcp: join: mark tests with data corruption as failed
    https://git.kernel.org/netdev/net/c/ca318e7bbb77
  - [net,v2,6/8] mptcp: pm: fix memory leak from alloc-during-teardown race
    https://git.kernel.org/netdev/net/c/efc33b5102ff
  - [net,v2,7/8] mptcp: fastopen: only mark MPTFO subflows with SYN data
    https://git.kernel.org/netdev/net/c/e00b63056fb4
  - [net,v2,8/8] mptcp: reclaim forward-allocated memory on RX path errors
    https://git.kernel.org/netdev/net/c/41b49a8b914e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-06 15:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 16:16 [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6 Matthieu Baerts (NGI0)
2026-08-03 16:16 ` [PATCH net v2 5/8] selftests: mptcp: join: mark tests with data corruption as failed Matthieu Baerts (NGI0)
2026-08-05 11:29 ` [PATCH net v2 0/8] mptcp: misc fixes for v7.2-rc6 Matthieu Baerts
2026-08-06 15:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).