From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796508252; b=uVyHJa8fGIVdMEmxC5o6tS/NfJv0UePU8pV2on6c2u4ORbK6VZsiq3hY8gxLW8EIjUAb hfQz32hk0w6+USaGDI6s4cmdvqxvBKwNYpRIM4WUCmpm9bdloYGiZIIM1uKrJFeGMXGiv uOKYlkxFF7IhnA6+VZI9x4J40o9MGylc4WGXqVT3xOmFvwsRTWrcOsDKi4wLKN6rEeQvR FMNB7LQ+MBL7/HDtooOksXLyDzFWDZHjUWZY7+OK6uedBbx9JTseOeZcYKGYqjvJG3o/Z oQn2kQRvpYddAEFoPrXPtksmdRElJb3Y+vyj/D07d4/tNXSVjyo+bQA+RGf0VKL6cjw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796508252; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=ZfQNpR/XERKnUQmc5sf+1W3TBOHJkOw/cT1oj/VNFR4=; b=SSkG6+VIa5sRbEwOTtljZs5pxW8iXar8DhJ3RycYxKBroDtCSMx1+Qn/YlLnn5BWhjDC gnCXjaSuBLMSPV5+vcvlxOTMwFlQlH/b3AYimGXZ4cwFxaNF2D5f4HBJtawfgD3ZxZiDz VNUE4mrgh1EDWFWSQbsvKAbxrFcIHWbc/8wkWXqwJ7YEYHARfKt9tER00DyG2ymgUghs4 3eIhwkKZCYM9iSSJWRWuPwg9LnKILK5Ky5FOa0tc1A1XDdErBVT9evj4iRmhV2/jdKjg4 Px66Vv5DdSHT1PMjRto6casg6c8JaTNNKFXMcl1rDu7wGFFx2eDSyTnNa+6aiGZ+oUg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gEz0gYt9; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 691E3606A31F; Sat, 5 Dec 2026 22:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gEz0gYt9 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AC541F00A07; Sat, 5 Dec 2026 22:04:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796508252; bh=ZfQNpR/XERKnUQmc5sf+1W3TBOHJkOw/cT1oj/VNFR4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=gEz0gYt9GTr/lvG72h2YEnxzAacBjQd6elGHpkCZHEjLw2ajoytoiopVHYz5JCpqL C+9cxLpPJ9bUJnPyLsMoNJBlSjnv/usS88YQgyL0E0N1kQ0/H8YNqrE2CjnBZjJo+c zP/zzjB5slRZ5NYQ+NPrnj9Qtr7/I4Su73N/NccQqCUXuhdp6C/1kkyki+8Bd6fhwf 3ik0wDRB4F7sDCD8129eztPuw/iMx6+YtE5DXzSDSgs6nEVtOxAzjCnYWB+tXaEdZI jCALcYW//wCLbNnf0RMv3v60S6nspqGdFiYX37kgk1qBX7rURC99qz83kZ8Ryr4aS+ HmIt8n7zxxkSA== Subject: Re: [PATCH net-next 05/10] mptcp: annotate lockless access to msk->scaling_ratio From: netdev-bot+sashiko@kernel.org To: matttbe@kernel.org Cc: martineau@kernel.org, geliang@kernel.org, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, willemb@google.com, horms@kernel.org, liyonglong@chinatelecom.cn, shuah@kernel.org, fw@strlen.de, netdev@vger.kernel.org, mptcp@lists.linux.dev, linux-kselftest@vger.kernel.org Date: Sat, 05 Dec 2026 22:04:10 +0000 Message-ID: <179650825092.3148.6699175124212588959@kernel.org> In-Reply-To: <20261204-net-next-mptcp-misc-feat-7-5-v1-5-1449de51adae@kernel.org> References: <20261204-net-next-mptcp-misc-feat-7-5-v1-5-1449de51adae@kernel.org> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The Fixes: tag names d2000361e4dd ("mptcp: better mptcp-level RTT estimator"), but lockless access to msk->scaling_ratio started… -- mptcp: annotate lockless access to msk->scaling_ratio This patch adds READ_ONCE()/WRITE_ONCE() annotations to msk->scaling_ratio. The writer is mptcp_rcv_rtt_update(), which runs in BH. The readers are mptcp_win_from_space(), mptcp_space_from_win() and the mptcp_rcvbuf_grow tracepoint. The race was reported by KCSAN between mptcp_cleanup_rbuf() and mptcp_data_ready(). Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/634 > Fixes: d2000361e4dd ("mptcp: better mptcp-level RTT estimator") [Severity: Low] Should this tag point to b8dc6d6ce931 ("mptcp: fix rcv buffer auto-tuning") instead, or in addition? That 2023 commit added the u8 msk->scaling_ratio field and the mptcp_win_from_space() helper, which reads the field with a plain load: net/mptcp/protocol.h:mptcp_win_from_space() { return __tcp_win_from_space(mptcp_sk(sk)->scaling_ratio, space); } It also made mptcp_space() in net/mptcp/subflow.c read the field through that helper: *space = __mptcp_space(sk); *full_space = mptcp_win_from_space(sk, READ_ONCE(sk->sk_rcvbuf)); mptcp_space() is called from __tcp_select_window() on the subflow. It runs under the subflow lock or in subflow BH, for example when an ACK is sent on receive. It does not run under msk ownership. The writer added in that commit lived in mptcp_rcv_space_adjust(), which runs in process context with the msk owned: msk->scaling_ratio = scaling_ratio; So the subflow-side reader and the msk-side writer were never serialized, even before d2000361e4dd. That later commit moved the writer into BH via mptcp_rcv_rtt_update(). It also exposed a second reader, mptcp_cleanup_rbuf(), which is the one in the KCSAN splat. With the current tag, stable trees that carry b8dc6d6ce931 but not d2000361e4dd, such as 6.6.y and 6.12.y, would not pick this up. Those trees would also need the annotation on the older writer in mptcp_rcv_space_adjust() rather than in mptcp_rcv_rtt_update(). -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae%40kernel.org