[RFC net-next v11 0/2] inet_diag: restrict MPTCP sequence counters

Kalpan Jani posted 2 patches 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20261028082704.1609493-1-kalpan.jani@mpiricsoftware.com
include/linux/inet_diag.h | 3 ++-
net/ipv4/inet_diag.c      | 6 +++---
net/ipv4/raw_diag.c       | 2 +-
net/ipv4/tcp_diag.c       | 2 +-
net/ipv4/udp_diag.c       | 2 +-
net/mptcp/mptcp_diag.c    | 8 +++++++-
net/sctp/diag.c           | 6 +++---
7 files changed, 18 insertions(+), 11 deletions(-)
[RFC net-next v11 0/2] inet_diag: restrict MPTCP sequence counters
Posted by Kalpan Jani 1 week ago
This series updates v10 following the review discussion.

Instead of normalising sequence counters, it restricts their visibility
to users with CAP_NET_ADMIN.

Patch 1 passes the request's CAP_NET_ADMIN status through the generic
inet-diag callback. Socket-destruction notifications pass false because
there is no individual requesting user.

Patch 2 zeros mptcpi_write_seq, mptcpi_snd_una and mptcpi_rcv_nxt in
unprivileged MPTCP diagnostic responses. The MPTCP_INFO getsockopt path
remains unchanged.

Changes since v10:
- Drop IDSN-based sequence normalization.
- Split generic capability propagation and MPTCP visibility restriction.

Testing:
- W=1 build of all six affected diagnostic objects against the local
  mptcp/net-next reference.
- checkpatch.pl --strict: zero errors and zero warnings for both patches.

Kalpan Jani (2):
  inet_diag: pass net_admin to get_info
  mptcp: hide seq counters without net_admin

 include/linux/inet_diag.h | 3 ++-
 net/ipv4/inet_diag.c      | 6 +++---
 net/ipv4/raw_diag.c       | 2 +-
 net/ipv4/tcp_diag.c       | 2 +-
 net/ipv4/udp_diag.c       | 2 +-
 net/mptcp/mptcp_diag.c    | 8 +++++++-
 net/sctp/diag.c           | 6 +++---
 7 files changed, 18 insertions(+), 11 deletions(-)

-- 
2.43.0
Re: [RFC net-next v11 0/2] inet_diag: restrict MPTCP sequence counters
Posted by MPTCP CI 1 week ago
Hi Kalpan,

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): Success! ✅
- 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: Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/40658455981

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


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)