lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67abed58-2014-4df6-847e-3e82bc0957fe@redhat.com>
Date: Fri, 24 Oct 2025 12:09:34 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <edumazet@...gle.com>, "David S . Miller"
 <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>
Cc: Simon Horman <horms@...nel.org>, Neal Cardwell <ncardwell@...gle.com>,
 Willem de Bruijn <willemb@...gle.com>, Kuniyuki Iwashima
 <kuniyu@...gle.com>, Matthieu Baerts <matttbe@...nel.org>,
 Mat Martineau <martineau@...nel.org>, Geliang Tang <geliang@...nel.org>,
 netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next 2/3] tcp: add newval parameter to
 tcp_rcvbuf_grow()

Hi Eric,

Many thanks for tracking this down!

Recently we are observing mptcp selftests instabilities in
simult_flows.sh, Geliang bisected them to e118cdc34dd1 ("mptcp: rcvbuf
auto-tuning improvement") and the rcvbuf growing less. I *think* mptcp
selftests provide some value even for plain tcp :)

On 10/24/25 9:50 AM, Eric Dumazet wrote:
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 94a5f6dcc5775e1265bb9f3c925fa80ae8c42924..2795acc96341765a3ec65657ec179cfd52ede483 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -194,17 +194,19 @@ static bool mptcp_ooo_try_coalesce(struct mptcp_sock *msk, struct sk_buff *to,
>   * - mptcp does not maintain a msk-level window clamp
>   * - returns true when  the receive buffer is actually updated
>   */
> -static bool mptcp_rcvbuf_grow(struct sock *sk)
> +static bool mptcp_rcvbuf_grow(struct sock *sk, u32 newval)
>  {
>  	struct mptcp_sock *msk = mptcp_sk(sk);
>  	const struct net *net = sock_net(sk);
> -	int rcvwin, rcvbuf, cap;
> +	u32 rcvwin, rcvbuf, cap, oldval;
>  
> +	oldval = msk->rcvq_space.copied;
> +	msk->rcvq_space.copied = newval;

I *think* the above should be:

	oldval = msk->rcvq_space.space;
	msk->rcvq_space.space = newval;

mptcp tracks the copied bytes incrementally - msk->rcvq_space.copied is
updated at each rcvmesg() iteration - and such difference IMHO makes
porting this kind of changes to mptcp a little more difficult.

If you prefer, I can take care of the mptcp bits afterwards - I'll also
try to remove the mentioned difference and possibly move the algebra in
a common helper.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ