[PATCH mptcp-net 00/34] mptcp: misc fixes

Matthieu Baerts (NGI0) posted 34 patches 1 week, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20261113-mptcp-cmason-fixes-v1-0-9205b77e9a2f@kernel.org
There is a newer version of this series
include/net/sock.h                              |   1 +
net/core/sock.c                                 |   9 +-
net/ipv4/inet_connection_sock.c                 |   8 +-
net/ipv4/syncookies.c                           |   3 +-
net/mptcp/options.c                             |  39 +++++-
net/mptcp/pm.c                                  |  24 +++-
net/mptcp/pm_kernel.c                           |   7 +-
net/mptcp/protocol.c                            | 175 ++++++++++++++++--------
net/mptcp/protocol.h                            |  23 +++-
net/mptcp/subflow.c                             |  81 +++++++++--
tools/testing/selftests/net/mptcp/mptcp_join.sh |  10 +-
11 files changed, 290 insertions(+), 90 deletions(-)
[PATCH mptcp-net 00/34] mptcp: misc fixes
Posted by Matthieu Baerts (NGI0) 1 week, 3 days ago
Here are various fixes, mostly from Chris Mason and Josef Bacik:

- Patches 1-2: drain the queues of a TCP or MPTCP socket when listen()
  fails, not to leak sockets and their netns. Fixes for v3.7 and v5.11.

- Patch 3: clear inet_opt in the child of an IPv6 listener, to avoid a
  double free with SELinux and NetLabel. A fix for v5.6.

- Patches 4-6: do not lose an RM_ADDR, when received in a row, or sent
  with a pending ADD_ADDR echo. Fixes for v5.13, v5.10 and v5.15.

- Patches 7-8: do not leave data unsent after a memory shortage. Fixes
  for another fix introduced in v6.19 and targeting v5.15, and for
  v5.11.

- Patches 9-10: do not leak an orphan moved to the CLOSE state outside
  the worker. Fixes for v6.15, and for another fix introduced in v6.6
  and targeting v5.11.

- Patch 11: do not send data beyond the window announced by the peer. A
  fix for v5.11.

- Patch 12: drop the ACKs with a SYN cookie and no MP_JOIN on PM
  listeners, which could stop accepting new subflows. A fix for v5.12.

- Patches 13-14: do not let PM listeners pin their netns, leaked
  otherwise. A fix for v5.12.

- Patch 15: close a subflow reset because of a bad mapping, not to keep
  the MPTCP socket established without subflows. A fix for v5.12.

- Patch 16: initialize drop_req, not to leak sockets with SO_REUSEPORT
  migration. A fix for v5.14.

- Patches 17-18: count MPTCP listeners correctly in /proc/net/protocols,
  and send their creation event once. Fixes for another fix introduced
  in v6.4 and targeting v5.17, and for v6.2.

- Patches 19-20: avoid data delivered twice around a fallback to TCP,
  with old data in flight, or resent to a peer that fell back. Fixes for
  v5.19, and for another fix introduced in v6.12 and targeting v5.13.

- Patches 21-22: do not count a signal+subflow ID 0 endpoint as used at
  each re-creation, and validate it. A fix for other fixes introduced in
  v6.11 and v7.0, and targeting v6.0 and v6.11.

- Patches 23-26: with TFO, send the data written by a server before the
  third ACK as soon as this ACK arrives, also in case of fallback to
  TCP, even if the connection was shut down. Fixes for v6.2 and v5.19.

- Patch 27: do not pass a BPF request sock to an MPTCP listener, to
  avoid a slab-out-of-bounds write. A fix for v6.9.

- Patches 28-31: reclaim the forward memory after coalescing skbs, and
  do not overcharge the memcg at accept(). Fixes for v6.19.

- Patches 32-33: after a fallback, fix the dummy mapping of overlapping
  segments, and continue the last mapping. Fixes for v6.19.

- Patch 34: RFC for mptcp-next: reset the subflow when the DSS
  disappears after a DATA_ACK, instead of a fallback to TCP, as
  suggested by RFC 8684.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Chris Mason (16):
      tcp: drain the queues of a listen() that fails
      mptcp: drain the queues of a listen() that fails
      mptcp: clear inet_opt in the child of an IPv6 listener
      mptcp: arm the rtx timer if a push leaves data behind
      mptcp: force the charge for the first skb of a subflow
      mptcp: leave an orphan's DATA_FIN to the worker
      mptcp: drop non-MP_JOIN cookie ACKs on PM listeners
      mptcp: close a subflow reset for a bad mapping
      mptcp: initialize drop_req in subflow_init_req()
      mptcp: do not fallback while old data is in flight
      mptcp: stop resending data to a peer that fell back
      tcp: do not pass a BPF reqsk to an MPTCP listener
      mptcp: reclaim forward memory after coalescing skbs
      mptcp: don't charge a shared page twice at accept()
      mptcp: don't charge the backlog twice at accept()
      mptcp: continue the last mapping after a fallback

Geliang Tang (1):
      mptcp: fix dummy mapping of overlapping segments

Josef Bacik (5):
      mptcp: pm: work on a copy of the received RM_ADDR list
      mptcp: pm: don't drop an RM_ADDR behind a pending one
      mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR
      mptcp: pm: don't let listeners pin their netns
      mptcp: pm: kernel: don't count signal+subflow ID 0 endp

Matthieu Baerts (NGI0) (12):
      mptcp: don't leak an orphan when the PM closes its last subflow
      mptcp: do not use a raised snd_wnd for the send window
      net: add __sk_net_refcnt_upgrade() with a GFP mask
      mptcp: pm: kernel: count endpoint listeners as sockets in use
      mptcp: count a listener once when listen() is called again
      selftests: mptcp: join: check re-adding signal+subflow ID 0 endp
      mptcp: use sk instead of casting msk in check_fully_established()
      mptcp: push queued data on passive TFO subflows becoming established
      mptcp: push queued data on passive TFO subflows falling back to TCP
      mptcp: don't send a FIN before the pending data on fallback
      mptcp: don't charge a subflow twice when it joins during accept()
      [RFC mptcp-next] mptcp: reset when the DSS disappears after a DATA_ACK

 include/net/sock.h                              |   1 +
 net/core/sock.c                                 |   9 +-
 net/ipv4/inet_connection_sock.c                 |   8 +-
 net/ipv4/syncookies.c                           |   3 +-
 net/mptcp/options.c                             |  39 +++++-
 net/mptcp/pm.c                                  |  24 +++-
 net/mptcp/pm_kernel.c                           |   7 +-
 net/mptcp/protocol.c                            | 175 ++++++++++++++++--------
 net/mptcp/protocol.h                            |  23 +++-
 net/mptcp/subflow.c                             |  81 +++++++++--
 tools/testing/selftests/net/mptcp/mptcp_join.sh |  10 +-
 11 files changed, 290 insertions(+), 90 deletions(-)
---
base-commit: 168bc9ace0731cc00cfabb8198231e577df8efaf
base-tree: https://github.com/multipath-tcp/mptcp_net-next.git t/upstream
change-id: 20261110-mptcp-cmason-fixes-eec0054c880a

Best regards,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH mptcp-net 00/34] mptcp: misc fixes
Posted by MPTCP CI 1 week, 2 days ago
Hi Matthieu,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Unstable: 1 failed test(s): selftest_diag ⚠️ 
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Perf: Unstable: 1 failed test(s): validation:sched-weak-secondary ⚠️ 
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/43501866652

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/c88781081116
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1210925


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)