[PATCH mptcp-net v5 00/13] mptcp: fix endpoints with 'signal' and 'subflow' flags

Matthieu Baerts (NGI0) posted 13 patches 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20240726-mptcp-pm-avail-v5-0-fb1117ddeef6@kernel.org
net/mptcp/pm.c                                  |  24 ---
net/mptcp/pm_netlink.c                          | 195 ++++++++++++++----------
net/mptcp/pm_userspace.c                        |  40 ++---
net/mptcp/protocol.h                            |  19 +--
net/mptcp/subflow.c                             |  29 ++--
tools/testing/selftests/net/mptcp/mptcp_join.sh |  31 ++++
6 files changed, 180 insertions(+), 158 deletions(-)
[PATCH mptcp-net v5 00/13] mptcp: fix endpoints with 'signal' and 'subflow' flags
Posted by Matthieu Baerts (NGI0) 3 months ago
The first 11 patches have already been applied. Here are the remaining
ones.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Changes in v5:
- Split patch 1 (previously 12): the renaming has been done in a
  dedicated patch at the end (patch patch 12), for -next.
- Patch 10: fix typo and avoid memcpy.
- Patch 11: fix comment.
- Patch 13: fix build issue and use a new dedicated struct.
- Please see the individual changelog for more details.
- Link to v4: https://lore.kernel.org/r/20240722-mptcp-pm-avail-v4-0-15bfd73de384@kernel.org

Changes in v4:
- Patch 19: check for msk->first != NULL
- New patches 21-22
- Imported patch 23: might be easier to review all of them, then this
  single one alone, while it depends on the previous ones.
- Link to v3: https://lore.kernel.org/r/20240719-mptcp-pm-avail-v3-0-e96b5591ced3@kernel.org

Changes in v3:
- Small changes in patches 10 and 14, see individual changelog (Geliang)
- New patches 18-20: small fixes
- Link to v2: https://lore.kernel.org/r/20240715-mptcp-pm-avail-v2-0-fc5153bd1f6e@kernel.org

Changes in v2:
- Do not split id_avail_bitmap per target in patch 5 (Paolo)
- Explicit deny (patch 2), reduce indentation (patch 3), stop earlier
  (patch 4) (Paolo)
- New fixes and tests (patches 8-17).
- Link to v1: https://lore.kernel.org/r/20240621-mptcp-pm-avail-v1-0-b692d5eb89b5@kernel.org

---
Matthieu Baerts (NGI0) (13):
      mptcp: pm: re-using ID of unused flushed subflows
      selftests: mptcp: join: test for flush/re-add endpoints
      mptcp: pm: remove mptcp_pm_remove_subflow()
      mptcp: pm: only mark 'subflow' endp as available
      mptcp: pm: only decrement add_addr_accepted for MPJ req
      mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR
      mptcp: pm: only in-kernel cannot have entries with ID 0
      mptcp: pm: fullmesh: select the right ID later
      selftests: mptcp: join: validate fullmesh endp on 1st sf
      mptcp: pm: avoid possible UaF when selecting endp
      mptcp: pm: reuse ID 0 after delete and re-add
      mptcp: pm: rename helpers linked to 'flush'
      mptcp: pm: reduce entries iterations on connect

 net/mptcp/pm.c                                  |  24 ---
 net/mptcp/pm_netlink.c                          | 195 ++++++++++++++----------
 net/mptcp/pm_userspace.c                        |  40 ++---
 net/mptcp/protocol.h                            |  19 +--
 net/mptcp/subflow.c                             |  29 ++--
 tools/testing/selftests/net/mptcp/mptcp_join.sh |  31 ++++
 6 files changed, 180 insertions(+), 158 deletions(-)
---
base-commit: a9a9b3b154d187864b73eb0e86a0ff737d79a10a
change-id: 20240620-mptcp-pm-avail-f5e3957be441

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH mptcp-net v5 00/13] mptcp: fix endpoints with 'signal' and 'subflow' flags
Posted by Matthieu Baerts 3 months ago
Hi Mat, Geliang,

On 26/07/2024 16:28, Matthieu Baerts (NGI0) wrote:
> The first 11 patches have already been applied. Here are the remaining
> ones.
> 
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Changes in v5:
> - Split patch 1 (previously 12): the renaming has been done in a
>   dedicated patch at the end (patch patch 12), for -next.
> - Patch 10: fix typo and avoid memcpy.
> - Patch 11: fix comment.
> - Patch 13: fix build issue and use a new dedicated struct.
> - Please see the individual changelog for more details.
> - Link to v4: https://lore.kernel.org/r/20240722-mptcp-pm-avail-v4-0-15bfd73de384@kernel.org
Thank you for the reviews!

These patches are now in our tree (with the requested modification in
patch 9/13)

New patches for t/upstream-net and t/upstream:
- 4fdf3e16474d: mptcp: pm: re-using ID of unused flushed subflows
- f4dcf600f081: selftests: mptcp: join: test for flush/re-add endpoints
- 54cd819d5f1f: mptcp: pm: remove mptcp_pm_remove_subflow()
- 5be0e90ef7d3: mptcp: pm: only mark 'subflow' endp as available
- fdf749c7585a: mptcp: pm: only decrement add_addr_accepted for MPJ req
- 6eb489c794e8: mptcp: pm: check add_addr_accept_max before accepting
new ADD_ADDR
- 91dc97dedafa: mptcp: pm: only in-kernel cannot have entries with ID 0
- 3cc3d86a170e: mptcp: pm: fullmesh: select the right ID later
- 19c879bdde12: selftests: mptcp: join: validate fullmesh endp on 1st sf
- b84992e37697: mptcp: pm: avoid possible UaF when selecting endp
- ba96900cae7a: mptcp: pm: reuse ID 0 after delete and re-add
- Results: 36737d2814d6..6cd1e6d73592 (export-net)
- Results: dec783f2e72a..2f4228f46030 (export)

New patches for t/upstream:
- 1d3e4f41c9fc: mptcp: pm: rename helpers linked to 'flush'
- 54792ce59a08: mptcp: pm: reduce entries iterations on connect
- Results: 2f4228f46030..6197303cc231 (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/af4eff14c4262c736783183997c94795ccff10d0/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/2ec038c21e3561ad3df17324253524d53d6ff97b/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-net v5 00/13] mptcp: fix endpoints with 'signal' and 'subflow' flags
Posted by Mat Martineau 3 months ago
On Fri, 26 Jul 2024, Matthieu Baerts (NGI0) wrote:

> The first 11 patches have already been applied. Here are the remaining
> ones.
>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Changes in v5:
> - Split patch 1 (previously 12): the renaming has been done in a
>  dedicated patch at the end (patch patch 12), for -next.
> - Patch 10: fix typo and avoid memcpy.
> - Patch 11: fix comment.
> - Patch 13: fix build issue and use a new dedicated struct.
> - Please see the individual changelog for more details.
> - Link to v4: https://lore.kernel.org/r/20240722-mptcp-pm-avail-v4-0-15bfd73de384@kernel.org
>

Hi Matthieu -

v5 LGTM, with the "fix when applying" changes already discussed in this 
thread.

Reviewed-by: Mat Martineau <martineau@kernel.org>

> Changes in v4:
> - Patch 19: check for msk->first != NULL
> - New patches 21-22
> - Imported patch 23: might be easier to review all of them, then this
>  single one alone, while it depends on the previous ones.
> - Link to v3: https://lore.kernel.org/r/20240719-mptcp-pm-avail-v3-0-e96b5591ced3@kernel.org
>
> Changes in v3:
> - Small changes in patches 10 and 14, see individual changelog (Geliang)
> - New patches 18-20: small fixes
> - Link to v2: https://lore.kernel.org/r/20240715-mptcp-pm-avail-v2-0-fc5153bd1f6e@kernel.org
>
> Changes in v2:
> - Do not split id_avail_bitmap per target in patch 5 (Paolo)
> - Explicit deny (patch 2), reduce indentation (patch 3), stop earlier
>  (patch 4) (Paolo)
> - New fixes and tests (patches 8-17).
> - Link to v1: https://lore.kernel.org/r/20240621-mptcp-pm-avail-v1-0-b692d5eb89b5@kernel.org
>
> ---
> Matthieu Baerts (NGI0) (13):
>      mptcp: pm: re-using ID of unused flushed subflows
>      selftests: mptcp: join: test for flush/re-add endpoints
>      mptcp: pm: remove mptcp_pm_remove_subflow()
>      mptcp: pm: only mark 'subflow' endp as available
>      mptcp: pm: only decrement add_addr_accepted for MPJ req
>      mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR
>      mptcp: pm: only in-kernel cannot have entries with ID 0
>      mptcp: pm: fullmesh: select the right ID later
>      selftests: mptcp: join: validate fullmesh endp on 1st sf
>      mptcp: pm: avoid possible UaF when selecting endp
>      mptcp: pm: reuse ID 0 after delete and re-add
>      mptcp: pm: rename helpers linked to 'flush'
>      mptcp: pm: reduce entries iterations on connect
>
> net/mptcp/pm.c                                  |  24 ---
> net/mptcp/pm_netlink.c                          | 195 ++++++++++++++----------
> net/mptcp/pm_userspace.c                        |  40 ++---
> net/mptcp/protocol.h                            |  19 +--
> net/mptcp/subflow.c                             |  29 ++--
> tools/testing/selftests/net/mptcp/mptcp_join.sh |  31 ++++
> 6 files changed, 180 insertions(+), 158 deletions(-)
> ---
> base-commit: a9a9b3b154d187864b73eb0e86a0ff737d79a10a
> change-id: 20240620-mptcp-pm-avail-f5e3957be441
>
> Best regards,
> -- 
> Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
>
>
Re: [PATCH mptcp-net v5 00/13] mptcp: fix endpoints with 'signal' and 'subflow' flags
Posted by MPTCP CI 3 months ago
Hi Matthieu,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/10113181188

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


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)