From: Joel Granados <joel.granados@kernel.org>
To: Yingjie Wang <x-professor@outlook.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"mptcp@lists.linux.dev" <mptcp@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"skhan@linuxfoundation.org" <skhan@linuxfoundation.org>,
"rdunlap@infradead.org" <rdunlap@infradead.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"edumazet@kernel.org" <edumazet@kernel.org>,
"ncardwell@google.com" <ncardwell@google.com>,
"gang.yan@linux.dev" <gang.yan@linux.dev>,
"kuniyu@google.com" <kuniyu@google.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"horms@kernel.org" <horms@kernel.org>,
"matttbe@kernel.org" <matttbe@kernel.org>,
"martineau@kernel.org" <martineau@kernel.org>,
"geliang@kernel.org" <geliang@kernel.org>,
"ycheng@google.com" <ycheng@google.com>,
"weiwan@google.com" <weiwan@google.com>
Subject: Re: [PATCH net-next v4 0/2] tcp/mptcp: prevent blackhole timeout arithmetic wraparound
Date: Mon, 23 Nov 2026 11:15:20 +0100 [thread overview]
Message-ID: <awQQ_9hlOQuOZlV3@hobbes> (raw)
In-Reply-To: <cover.1795424546.git.x-professor@outlook.com>
[-- Attachment #1: Type: text/plain, Size: 3244 bytes --]
On Mon, Nov 23, 2026 at 09:04:32AM +0000, Yingjie Wang wrote:
> The TCP Fast Open and MPTCP blackhole timeout calculations can wrap in
> 32-bit unsigned arithmetic, even on 64-bit kernels. With HZ=1000 and a
> 64-fold backoff, 67109 seconds becomes 8.7 seconds instead of about
> 50 days.
>
> Compute both delays in u64, cap them at MAX_JIFFY_OFFSET, and limit both
> initial timeout sysctls to one day. The new input limits reject values
> that were previously accepted, so this series remains for net-next and
> is not intended for stable.
>
> Changes since v3:
>
> - Drop the Fixes tags from both patches.
> - Leave the existing comments unchanged, as requested by Matthieu.
> - Combine the MPTCP arithmetic fix and input limit into one patch.
> - Name the MPTCP limit one_day_secs, as in TCP.
> - Drop Gang Yan's Reviewed-by from the combined MPTCP patch because the
> added input limit was outside the patch he reviewed. Keep Eric's
> Suggested-by for the MPTCP input limit.
> - Add Kuniyuki's Suggested-by for requesting a limit on the TCP sysctl.
> - Move the test notes out of the commit messages, as requested by Eric.
> - Rebase on net-next eb6d6c80d354.
>
> v3: https://lore.kernel.org/r/cover.1794847474.git.x-professor@outlook.com
> v2: https://lore.kernel.org/r/cover.1794672619.git.x-professor@outlook.com
> v1: https://lore.kernel.org/r/cover.1794325665.git.x-professor@outlook.com
>
> Testing on v4 and its unmodified base, x86-64, HZ=1000:
>
> - Loopback reproducers induced 12 blackholes with a 67109 second timeout
> and opened another connection 10 seconds later. The base kernel
> retried active TFO and MP_CAPABLE; v4 kept both disabled. Both probes
> completed using TCP on v4.
> - Both sysctls accepted 0, 1, 3600, 86399 and 86400, and rejected negative
> and above-limit values with EINVAL without changing the stored value.
> These checks passed in the initial and a new network namespace, with
> unchanged defaults and independent namespace values.
> - The affected objects built at each commit on x86-64 and i386 with
> W=1 and KCFLAGS=-Werror.
>
> The 32-bit cap was checked by compilation and arithmetic, not at runtime.
> The TCP and MPTCP selftests were not run locally.
>
> Yingjie Wang (2):
> tcp: avoid wrapping Fast Open blackhole timeout
> mptcp: avoid wrapping blackhole timeout
>
> Documentation/networking/ip-sysctl.rst | 1 +
> Documentation/networking/mptcp-sysctl.rst | 1 +
> net/ipv4/sysctl_net_ipv4.c | 1 +
> net/ipv4/tcp_fastopen.c | 4 +++-
> net/mptcp/ctrl.c | 6 +++++-
> 5 files changed, 11 insertions(+), 2 deletions(-)
>
>
> base-commit: eb6d6c80d35449c27471b1874f13066c09a8964d
> --
> 2.43.0
>
FYI: there is a fix for the conversion between jiffies and ms for sysctl
entries that just got merged [1] & [2]. It seems like what you are doing
here is orthogonal to that patch. I'm flagging it in case I have
misread.
Best
[1] https://lore.kernel.org/all/179531116414.1248683.10418563467755811748.pr-tracker-bot@kernel.org
[2] https://lore.kernel.org/all/20261118-lklm-sysctl-jiffie-ms-conv-v1-1-bb60e5101418@kernel.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2026-11-23 10:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 9:04 [PATCH net-next v4 0/2] tcp/mptcp: prevent blackhole timeout arithmetic wraparound Yingjie Wang
2026-11-23 9:04 ` [PATCH net-next v4 1/2] tcp: avoid wrapping Fast Open blackhole timeout Yingjie Wang
2026-11-27 9:28 ` Jiayuan Chen
2026-11-23 9:04 ` [PATCH net-next v4 2/2] mptcp: avoid wrapping " Yingjie Wang
2026-11-23 9:57 ` [PATCH net-next v4 0/2] tcp/mptcp: prevent blackhole timeout arithmetic wraparound Eric Dumazet
2026-11-23 10:15 ` Joel Granados [this message]
2026-11-23 10:18 ` Matthieu Baerts
2026-11-30 3:50 ` patchwork-bot+netdevbpf
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=awQQ_9hlOQuOZlV3@hobbes \
--to=joel.granados@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=gang.yan@linux.dev \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=weiwan@google.com \
--cc=x-professor@outlook.com \
--cc=ycheng@google.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.