Article View: linux.kernel.netdev
Article #16954Re: [PATCH net v2 1/2] tcp: avoid wrapping Fast Open blackhole timeout
From: netdev-bot+sashiko
Date: Mon, 16 Nov 2026 05:21
Date: Mon, 16 Nov 2026 05:21
117 lines
12875 bytes
12875 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The patch adds a new upper bound, `.extra2 = &one_day_secs`
(86400), to `net.ipv4.tcp_fastopen_blackhole_timeout_sec` in…
- [Low] The commit body of "tcp: avoid wrapping Fast Open blackhole
timeout" refers to patch revisions: 'In the v1 arithmetic-only test,…
--
tcp: avoid wrapping Fast Open blackhole timeout
This commit computes the Fast Open active-disable interval in
tcp_fastopen_active_should_disable() as a u64 and caps it at
MAX_JIFFY_OFFSET, so the delay can no longer wrap. It also limits
tcp_fastopen_blackhole_timeout_sec to 86400 seconds and documents the new
limit in ip-sysctl.rst.
> This issue was found using a static analysis tool. A loopback reproducer
> induced 12 Fast Open blackholes and waited 1.2 seconds before opening
> another connection. In the v1 arithmetic-only test, the unpatched kernel
> retried active Fast Open, while the fixed kernel used a regular TCP
> handshake. The reproducer required neither kernel modifications nor
> fault injection. The input limit added here rejects that large setting.
[ ... ]
> On the v2 kernel, the sysctl accepts 86400 seconds and rejects 86401,
> leaving the previous value unchanged.
[Severity: Low]
This isn't a bug, but these sentences mention patch revisions (v1 and v2).
Could this revision history go below the --- line instead? Once the patch is
merged, v1 and v2 won't mean anything in git history.
The wording also suggests that the only functional test of the arithmetic
fix (the 6912213 second timeout) was run on v1. The submitted code now
rejects that input, and the only v2 test described is the sysctl range
check.
The arithmetic fix still matters within the new limit. At HZ=1000,
64 * 86400 * 1000 = 5,529,600,000. In 32-bit math that wraps to
1,234,632,704 jiffies, which is about 14.3 days instead of 64 days.
Could the changelog describe a test of the submitted code on that path?
The companion MPTCP patch in this series uses the same v1/v2 wording.
> diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
> index bf193e7ec5168..5bc357e189bde 100644
> --- a/net/ipv4/sysctl_net_ipv4.c
> +++ b/net/ipv4/sysctl_net_ipv4.c
> @@ -1152,6 +1152,7 @@ static const struct ctl_table ipv4_net_table[] = {
> .mode = 0644,
> .proc_handler = proc_tfo_blackhole_detect_timeout,
> .extra1 = SYSCTL_ZERO,
> + .extra2 = &one_day_secs,
> },
[Severity: Medium]
Is this new upper bound needed for the overflow fix? The patch is also
tagged Cc: stable.
proc_tfo_blackhole_detect_timeout() calls proc_dointvec_minmax(), so extra2
is enforced:
net/ipv4/sysctl_net_ipv4.c:proc_tfo_blackhole_detect_timeout() {
...
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
if (write && ret == 0)
atomic_set(&net->ipv4.tfo_active_disable_times, 0);
...
}
Before this patch, any non-negative int was accepted, such as 172800 or
604800. Now those writes fail with -EINVAL. The stored value stays as it
was, and the tfo_active_disable_times reset is skipped.
At boot, the stored value is the per-netns default of 0 from tcp_sk_init().
If sysctl.conf has a multi-day value, would Fast Open blackhole detection
stay disabled after a stable update?
The u64 calculation and the cap in tcp_fastopen_active_should_disable()
already seem to handle every int input:
delay = (u64)multiplier * tfo_bh_timeout * HZ;
...
min(delay, MAX_JIFFY_OFFSET);
tfo_bh_timeout is at most 2^31-1, multiplier is at most 64, and HZ is at
most a little over 1000. The product stays below 2^48, and the cap covers
both 32-bit and 64-bit kernels. So the one day limit looks like a policy
change, not part of the fix.
The commit message mentions the limit. It doesn't say that values accepted
before will now be rejected.
The companion patch in this series, "mptcp: avoid wrapping blackhole
timeout", makes the same arithmetic fix and says "Preserve the existing
sysctl input range". So the two patches treat the input range differently.
Could the bound be dropped here? Or could it move to a separate patch,
without Cc: stable, whose changelog describes the narrower range?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1794672619.git.x-professor%40outlook.com
Technical Details
Message-ID:
<179480650221.3133.4194401145263235869@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364066-linux-kernel-netdev=dewy.ruReferences:
<072048c5616098a20126342372d66697c728881d.1794672619.git.x-professor@outlook.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364066-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2 1/2] tcp: avoid wrapping Fast Open blackhole timeout Date: Mon, 16 Nov 2026 05:21:42 +0000 Organization: Usenet Network Message-ID: <179480650221.3133.4194401145263235869@kernel.org> References: <072048c5616098a20126342372d66697c728881d.1794672619.git.x-professor@outlook.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1986360"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:JavaqABehOEfkWGf7KGZIcmaLCM= sha256:73M2IFk9+YXwT3E6F2xkLX1apYyGWS8LlQW/zi32RAI= sha1:dou918dN5EEHnwmsU5pImw4I8CI= sha256:tNVJCN1inCN5WBMdDJV3+tLrWOrUD64PtQ2fTjf9rrw= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 13FE2114B22; Mon, 16 Nov 2026 08:22:05 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tIaBPuzSvYNc; Mon, 16 Nov 2026 08:22:00 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-364066-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 1B9D7114B2F; Mon, 16 Nov 2026 08:21:50 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 4690730E3C; Mon, 16 Nov 2026 05:21:46 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794806505; b=zoprlfiAJSTs6yhTrjdFqlqDRwm/Sm8FXVwhOxODx42jP5m+qy/4x+K7v2dmgBytuNap KGOPdJUqVC5P1pTIWWfBfARatcvaiwRlt6TL7MWUAxT0Abcpdf10/JWLuDxEu3XnLdKAE bWmidak6+Yiyku1L+h7hOeP1AtG1JVCL39LeArCvn+g/dVr2LqADaE4SWNMzJukm/Bjn/ uLTA3X1u1pNlaHf2C+vw4AVP5DrOZD8bSA4QmwEBq0QdplhTJMw4CokyAJO4h1ZOmhYHI tGQZMUjPTWuHsD8vL9vRRDyqub7ltHJJoB4erhjGCo34/+COqqHojnLWvag5bmXHsJQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794806505; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=fBQuIlX1DRBYchoBiFw8IVANuBNaBS/6iLy0xMzuzEI=; b=wOwCiJEx6sFJlO5UdGp0wuM7yxdsNe2eRqQFAX7Foiqu9ZHfEtz1fNSaXRqQ/iszexVs HlAEye6Cmru+fggNRk9L2JOW6Jw0JrpvwSt2FAGGtJlOnco+u+LtDjScuzbvz+xhm2F9U qa+v+uQxIHS1bTv8rtngKySQXm4nnzB8f7U6WLgh+k/bN/nu/+3mo3g214AGwhRHrf9CT SYr8kYkziWEhSOAv9krhYCOMNnmKcsj6wx98GlLOoNinfQ3yl+JRMle2Xzr9HCpSJgv0O 4oUi4RjM1OD4EBRHlrreOVPQ6d/jdfckPAquH/AaewIJCZ9mqjBfWzY0y/r3EzAsBhg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kdbr1DW9; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B834606A33F; Mon, 16 Nov 2026 05:21:45 +0000 (UTC) X-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=kdbr1DW9 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794806504; b=J7Td53IbBQQAZHW6AkPF/M1MahDuoOocCOOSf3vUmqUNPiaE1Yzk7a++bGgFItuS1oDU TbpAKjwhRXvy11YtQm9nh8xMvDL2Q0qJt2TjlK/U0aah02nal5wuoEa7M3aM8TB4TIhZ/ n06XVAIfzNbFZiOq1gJ4nafI9LvUcAT2hBVIx+APF37JtYDEwYfS9owwE9ow8lXoQ9FKB 0LpPnhcSTCbWzoE2z8fzFQPdQtO9vkK9zYnHAh9qXyheix9Gdnb6L0Fpow9TZZ5MibQfq PpwSutwy/SlmmsWSWSvgbkAjPYUYssMSFSgcFbl++S0MeIjufmfNY4CaaFuiYm9Izcw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794806504; 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=fBQuIlX1DRBYchoBiFw8IVANuBNaBS/6iLy0xMzuzEI=; b=Wzj5Azt/9VyfuEzg8mhqcGhcLX6p2tdyPRwE+pVueGOs7lLc/If9/4k3RRQh3XfrCy+X io8PG5TdGW4Wdn8KIgxNMB6jM4IVNOlZOw0Df+TaUQIhX3KOUpUGeQLFaYFR4a1HRTGIH CwVSeA8C0HJTA/ih1ekda1lrecU0ey1/1YZUK0PmEbvaDl2MA2s2i6f9Ehd1oqJ3TG7/6 nWoXLTOh7bX7VXVEN/T+Q4FlxU9kERbQftwjwry5t4FeFrqRzHdkikPuL2X3zQ/06S97r Fr3eDC6Gd8uR2ZoXs/UOgjxI39rWtsk8cwk7sSkZokNoP3twGsqwJjVzdMGnfmTI5AA== X-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=kdbr1DW9; arc=none smtp.remote-ip=100.103.45.18 X-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 8AB00606A323; Mon, 16 Nov 2026 05:21:44 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B79721F000C4; Mon, 16 Nov 2026 05:21:42 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794806504; bh=fBQuIlX1DRBYchoBiFw8IVANuBNaBS/6iLy0xMzuzEI=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=kdbr1DW97+dIb6BvDMoons5bpJwMFi84dmJhwINDj1S4w/iHun5uxSEAfo2g4sQ2N SpPvvjkRcPmc+aDhIbJqe7BACUZFdvDEOwFFZIMwasljxW4EvLLnlApNjsYEvtYx16 Qpb+HMu9CfZ31u+WgJZwh4PKZlkt+ctyBtYv+8YFZ3Shvpepq1GMz7bzz9qK8gI1OF KQaX1pMzLiu0DU7nqpY47x5GsDn2C1PIiSzaW0WvsYyWL0tk7LoOJlyOP7dbQM/ebu qKF3ByTngMALVw19vnmqLV0K2aQ1JG7VGo3GM/+9vHKzo8XMFls8p7z4LP+RK+8FVk OhrPstSvYZ8Ug== X-Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, linux-kernel@vger.kernel.org, corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org, linux-doc@vger.kernel.org, edumazet@kernel.org, ncardwell@google.com, gang.yan@linux.dev, kuniyu@google.com, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, matttbe@kernel.org, martineau@kernel.org, geliang@kernel.org, ycheng@google.com, weiwan@google.com, stable@vger.kernel.org, yangang@kylinos.cn X-In-Reply-To: <072048c5616098a20126342372d66697c728881d.1794672619.git.x-professor@outlook.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list