Re: [PATCH net 1/2] tcp: avoid wrapping Fast Open blackhole timeout
From: Esko Mobius
Date: Sat Nov 14 2026 - 07:42:32 EST
On Thu, 12 Nov 2026 06:15:12 +0000, Kuniyuki Iwashima wrote:
> No one wants to configure 80 days blackhole timeout.
>
> Please apply a sane limit in proc_tfo_blackhole_detect_timeout().
When picking the limit, note that the product wraps long before 80 days.
With HZ=1000 and the maximum multiplier of 64, 64 * timeout * HZ exceeds
UINT_MAX once the timeout reaches 67109 seconds, about 18.6 hours. A
limit of one day would still wrap.
On 32-bit, time_before() also needs the interval to stay below 2^31
jiffies, so the current expression is only safe up to INT_MAX / HZ / 64
seconds, which is 33554 seconds (about 9.3 hours) with HZ=1000. So
either the limit is derived from that, or the u64 computation with a
clamp has to stay.
The same applies to net.mptcp.blackhole_timeout in patch 2, which uses
the same expression.
Thanks,
Yongjian