From: Matthieu Baerts <matttbe@kernel.org>
To: Kalpan Jani <kalpan.jani@mpiricsoftware.com>
Cc: mptcp <mptcp@lists.linux.dev>, martineau <martineau@kernel.org>,
pabeni <pabeni@redhat.com>
Subject: Re: [RFC net-next v10] mptcp: normalize seq numbers reported in mptcp_info
Date: Wed, 28 Oct 2026 10:43:05 +0100 [thread overview]
Message-ID: <495a89c5-40ca-4758-8366-6c4c28e28112@kernel.org> (raw)
In-Reply-To: <1ec0c2b5-a0fa-44e8-9ae8-dca9b7f90ec6@kernel.org>
Hi Kalpan,
On 27/10/2026 14:42, Matthieu Baerts wrote:
> Hi Kalpan,
>
> Thank you for your reply.
>
> On 27/10/2026 13:29, Kalpan Jani wrote:
>> Hi Matt,
>>
>> I investigated the existing byte counters and the diagnostic
>> capability path.
>>
>> The existing byte counters are not direct replacements for the
>> normalized sequence fields:
>>
>> - write_seq advances when application data is queued and when
>> DATA_FIN is added. bytes_sent tracks send progress, and the
>> retransmission path can update snd_nxt directly without updating
>> bytes_sent. - snd_una is assigned directly during connection setup,
>> outside __mptcp_snd_una_update(). Therefore, bytes_acked cannot be
>> assumed to reproduce snd_una - local_idsn. - ack_seq advances when
>> processing DATA_FIN, whereas bytes_received counts payload bytes.
>> Their initial values also differ.
>
> OK, let's not use the bytes counters then.
>
>> Regarding the capability check, the normal MPTCP diagnostic dump
>> paths have access to the original request skb and can check
>> netlink_net_capable(cb->skb, CAP_NET_ADMIN).
>
> Good!
>
>> However, inet_diag_handler_get_info() is also called for socket-
>> destruction notifications. In that path,
>> sock_diag_broadcast_destroy_work() creates a new skb and invokes the
>> callback without an original diagnostic request. Therefore, the
>> requester's capability cannot be recovered from that skb. Passing
>> false in this notification path appears to be the appropriate
>> conservative behavior.
>
> OK to pass false in this case.
>
>> Based on this investigation, I will keep the capability/privacy
>> change separate from sequence normalization. I will also address the
>> stale remote_idsn after disconnect and the inconsistent sequence
>> snapshot reported by Sashiko before sending another normalization
>> revision.
>
> Just to be sure it is clear: the main goal here is not to show the seq
> counters to everybody from the same netns. This can be done either by
> "normalising" them -- i.e. starting from 0 -- or by not presenting them
> to some users.
>
> Just thinking about that: for the normalisation, we can also just
> add/remove an offset the userspace cannot predict and different per
> connection. In fact, why not using the address of the msk pointer? I
> guess that should prevent the different issues reported by Sashiko, no?
Was this workaround using the msk address not working?
BTW, please next time don't send new series as a reply to an email,
start a new email thread instead.
> (In case of "other" existing issues, please split them and move them in
> a dedicated patch not to mix the fix and the main patch here.)
>
> If the "normalisation" is not possible, better not displaying them to
> non cap-admin users. But we don't need both.
>
> Cheers,
> Matt
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-10-28 9:43 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
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 ` Matthieu Baerts [this message]
2026-10-28 10:33 ` [RFC net-next v10] mptcp: normalize seq numbers reported in mptcp_info 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=495a89c5-40ca-4758-8366-6c4c28e28112@kernel.org \
--to=matttbe@kernel.org \
--cc=kalpan.jani@mpiricsoftware.com \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.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.