* [PATCH net-next v2] mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size
@ 2024-08-12 6:51 Eugene Syromiatnikov
2024-08-12 7:43 ` Matthieu Baerts
2024-08-14 2:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Eugene Syromiatnikov @ 2024-08-12 6:51 UTC (permalink / raw)
To: mptcp
Cc: Matthieu Baerts, Mat Martineau, Geliang Tang, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Davide Caratti, netdev,
linux-kernel
ssn_offset field is u32 and is placed into the netlink response with
nla_put_u32(), but only 2 bytes are reserved for the attribute payload
in subflow_get_info_size() (even though it makes no difference
in the end, as it is aligned up to 4 bytes). Supply the correct
argument to the relevant nla_total_size() call to make it less
confusing.
Fixes: 5147dfb50832 ("mptcp: allow dumping subflow context to userspace")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
---
v2:
- Added prefix to the patch subject
- Fixed commit message formatting (line width, "Fixes:" commit hash
prefix size)
v1: https://lore.kernel.org/mptcp/20240809094321.GA8122@asgard.redhat.com/
---
net/mptcp/diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mptcp/diag.c b/net/mptcp/diag.c
index 3ae46b545d2c..2d3efb405437 100644
--- a/net/mptcp/diag.c
+++ b/net/mptcp/diag.c
@@ -94,7 +94,7 @@ static size_t subflow_get_info_size(const struct sock *sk)
nla_total_size(4) + /* MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ */
nla_total_size_64bit(8) + /* MPTCP_SUBFLOW_ATTR_MAP_SEQ */
nla_total_size(4) + /* MPTCP_SUBFLOW_ATTR_MAP_SFSEQ */
- nla_total_size(2) + /* MPTCP_SUBFLOW_ATTR_SSN_OFFSET */
+ nla_total_size(4) + /* MPTCP_SUBFLOW_ATTR_SSN_OFFSET */
nla_total_size(2) + /* MPTCP_SUBFLOW_ATTR_MAP_DATALEN */
nla_total_size(4) + /* MPTCP_SUBFLOW_ATTR_FLAGS */
nla_total_size(1) + /* MPTCP_SUBFLOW_ATTR_ID_REM */
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2] mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size
2024-08-12 6:51 [PATCH net-next v2] mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size Eugene Syromiatnikov
@ 2024-08-12 7:43 ` Matthieu Baerts
2024-08-12 21:25 ` Jakub Kicinski
2024-08-14 2:30 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Matthieu Baerts @ 2024-08-12 7:43 UTC (permalink / raw)
To: Eugene Syromiatnikov, mptcp
Cc: Mat Martineau, Geliang Tang, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Davide Caratti, netdev, linux-kernel
Hi Eugene, Network maintainers,
On 12/08/2024 08:51, Eugene Syromiatnikov wrote:
> ssn_offset field is u32 and is placed into the netlink response with
> nla_put_u32(), but only 2 bytes are reserved for the attribute payload
> in subflow_get_info_size() (even though it makes no difference
> in the end, as it is aligned up to 4 bytes). Supply the correct
> argument to the relevant nla_total_size() call to make it less
> confusing.
>
> Fixes: 5147dfb50832 ("mptcp: allow dumping subflow context to userspace")
> Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
> ---
> v2:
> - Added prefix to the patch subject
> - Fixed commit message formatting (line width, "Fixes:" commit hash
> prefix size)
Thank you for the v2!
The patch looks good to me:
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Because it is a fix, I think it is a candidate for -net, not net-next.
@Network maintainers: is it OK for you to apply this v2 in "net", not
"net-next"? Or is it easier for you to have a v3 with a different prefix?
(No conflicts to apply this patch on -net, the code didn't change for 4
years.)
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2] mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size
2024-08-12 7:43 ` Matthieu Baerts
@ 2024-08-12 21:25 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2024-08-12 21:25 UTC (permalink / raw)
To: Matthieu Baerts
Cc: Eugene Syromiatnikov, mptcp, Mat Martineau, Geliang Tang,
David S. Miller, Eric Dumazet, Paolo Abeni, Davide Caratti,
netdev, linux-kernel
On Mon, 12 Aug 2024 09:43:29 +0200 Matthieu Baerts wrote:
> @Network maintainers: is it OK for you to apply this v2 in "net", not
> "net-next"? Or is it easier for you to have a v3 with a different prefix?
>
> (No conflicts to apply this patch on -net, the code didn't change for 4
> years.)
Looks trivial, should be safe to cross-apply, no need for v3.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2] mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size
2024-08-12 6:51 [PATCH net-next v2] mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size Eugene Syromiatnikov
2024-08-12 7:43 ` Matthieu Baerts
@ 2024-08-14 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-08-14 2:30 UTC (permalink / raw)
To: Eugene Syromiatnikov
Cc: mptcp, matttbe, martineau, geliang, davem, edumazet, kuba, pabeni,
dcaratti, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 12 Aug 2024 08:51:23 +0200 you wrote:
> ssn_offset field is u32 and is placed into the netlink response with
> nla_put_u32(), but only 2 bytes are reserved for the attribute payload
> in subflow_get_info_size() (even though it makes no difference
> in the end, as it is aligned up to 4 bytes). Supply the correct
> argument to the relevant nla_total_size() call to make it less
> confusing.
>
> [...]
Here is the summary with links:
- [net-next,v2] mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size
https://git.kernel.org/netdev/net/c/655111b838cd
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-14 2:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 6:51 [PATCH net-next v2] mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size Eugene Syromiatnikov
2024-08-12 7:43 ` Matthieu Baerts
2024-08-12 21:25 ` Jakub Kicinski
2024-08-14 2:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).