From: Matthieu Baerts <matttbe@kernel.org>
To: Kalpan Jani <kalpan.jani@mpiricsoftware.com>, mptcp@lists.linux.dev
Cc: shardul.b@mpiricsoftware.com, janak@mpiric.us, kalpanjani009@gmail.com
Subject: Re: [RFC net-next v10] mptcp: normalize seq numbers reported in mptcp_info
Date: Tue, 27 Oct 2026 08:33:42 +0100 [thread overview]
Message-ID: <d802ebc3-477b-4e86-b4d9-9fa2a3005e40@kernel.org> (raw)
In-Reply-To: <20261027062750.2095515-1-kalpan.jani@mpiricsoftware.com>
Hi Kalpan,
On 27/10/2026 07:27, Kalpan Jani wrote:
> Normalize the MPTCP sequence fields relative to the initial data sequence
> number baselines.
>
> Keep the normalized values available to privileged diagnostic requests,
> while zeroing them in INET_DIAG_INFO for callers without CAP_NET_ADMIN.
>
> Normalize MPTCP_SUBFLOW_ATTR_MAP_SEQ against remote_idsn as well, so
> subflow mapping sequence numbers use the same remote sequence space as
> mptcpi_rcv_nxt.
>
> Pass requester capability state to idiag_get_info callbacks. Other
> protocol callbacks retain their existing behavior.
>
> Link: https://github.com/multipath-tcp/mptcp_net-next/issues/445
> Signed-off-by: Kalpan Jani <kalpan.jani@mpiricsoftware.com>
> ---
> Changes since v9:
Thank you for the new version!
> - Keep normalized sequence values available to privileged diagnostic
> requests and zero the three sequence fields for unprivileged
> INET_DIAG_INFO callers.
> - Pass requester capability state to idiag_get_info callbacks while
> preserving existing behavior for other protocol callbacks.
I think it should be one or the other: the suggestion to disable the
different fields for non net-admin is a sort of workaround not to have
to deal with the possible issues reported by Sashiko.
If we take this route, the only modifications on MPTCP side would be in
the diag files (or if you have fixes, they can be in separated patches).
Also, it would be easier to split this change in two: exposing the
net_admin boolean, then modifying MPTCP to hide data.
BTW, using the bytes sent/received was not something that could be used
here?
> - Normalize MPTCP_SUBFLOW_ATTR_MAP_SEQ relative to remote_idsn so it
> uses the same remote sequence-number baseline as mptcpi_rcv_nxt.
I guess it would be 0 for non net-admin.
(...)
> diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
> index 34b77aa87d0a4..362161bf39fe3 100644
> --- a/net/ipv4/inet_diag.c
> +++ b/net/ipv4/inet_diag.c
> @@ -276,7 +276,7 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
> }
>
> if (!icsk) {
> - handler->idiag_get_info(sk, r, NULL);
> + handler->idiag_get_info(sk, r, NULL, net_admin);
> goto out;
> }
>
> @@ -327,7 +327,7 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
> goto errout;
> }
>
> - handler->idiag_get_info(sk, r, info);
> + handler->idiag_get_info(sk, r, info, net_admin);
>
> if (ext & (1 << (INET_DIAG_INFO - 1)) && handler->idiag_get_aux)
> if (handler->idiag_get_aux(sk, net_admin, skb) < 0)
> @@ -1027,7 +1027,7 @@ int inet_diag_handler_get_info(struct sk_buff *skb, struct sock *sk)
> if (attr)
> info = nla_data(attr);
>
> - handler->idiag_get_info(sk, r, info);
> + handler->idiag_get_info(sk, r, info, false);
I didn't check, but can you not extract the capability from the skb?
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-10-27 7:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 6:27 [RFC net-next v10] mptcp: normalize seq numbers reported in mptcp_info Kalpan Jani
2026-10-27 6:51 ` sashiko-bot
2026-10-27 7:33 ` Matthieu Baerts [this message]
2026-10-27 7:38 ` MPTCP CI
2026-10-27 9:54 ` Kalpan Jani
2026-10-27 10:45 ` Matthieu Baerts
2026-10-27 12:29 ` Kalpan Jani
2026-10-27 13:42 ` Matthieu Baerts
2026-10-28 8:26 ` [RFC net-next v11 0/2] inet_diag: restrict MPTCP sequence counters Kalpan Jani
2026-10-28 8:27 ` [RFC net-next v11 1/2] inet_diag: pass net_admin to get_info Kalpan Jani
2026-10-28 8:31 ` netdev-bot+sinfo
2026-10-28 8:27 ` [RFC net-next v11 2/2] mptcp: hide seq counters without net_admin Kalpan Jani
2026-10-28 9:32 ` [RFC net-next v11 0/2] inet_diag: restrict MPTCP sequence counters MPTCP CI
2026-10-28 9:43 ` [RFC net-next v10] mptcp: normalize seq numbers reported in mptcp_info Matthieu Baerts
2026-10-28 10:33 ` Kalpan Jani
2026-10-28 10:41 ` Matthieu Baerts
2026-10-28 11:36 ` Kalpan Jani
2026-10-29 10:05 ` Kalpan Jani
2026-10-29 11:29 ` Matthieu Baerts
2026-10-29 11:31 ` Matthieu Baerts
2026-10-28 19:41 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d802ebc3-477b-4e86-b4d9-9fa2a3005e40@kernel.org \
--to=matttbe@kernel.org \
--cc=janak@mpiric.us \
--cc=kalpan.jani@mpiricsoftware.com \
--cc=kalpanjani009@gmail.com \
--cc=mptcp@lists.linux.dev \
--cc=shardul.b@mpiricsoftware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.