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: <CANn89i+CntWvmzsSVOzUDTw4Cb0cf3-83C8Y7ByPxD7iN38vtw@mail.gmail.com>
Date: Fri, 7 Nov 2025 00:37:05 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Kuniyuki Iwashima <kuniyu@...gle.com>
Cc: Neal Cardwell <ncardwell@...gle.com>, "David S . Miller" <davem@...emloft.net>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, 
	Yuchung Cheng <ycheng@...gle.com>, Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v1 net-next 3/6] tcp: Remove redundant init for req->num_timeout.

On Wed, Nov 5, 2025 at 4:34 PM Kuniyuki Iwashima <kuniyu@...gle.com> wrote:
>
> Commit 5903123f662e ("tcp: Use BPF timeout setting for SYN ACK
> RTO") introduced req->timeout and initialised it in 3 places:
>
>   1. reqsk_alloc() sets 0
>   2. inet_reqsk_alloc() sets TCP_TIMEOUT_INIT
>   3. tcp_conn_request() sets tcp_timeout_init()
>
> 1. has been always redundant as 2. overwrites it immediately.
>
> 2. was necessary for TFO SYN+ACK but is no longer needed after
> commit 8ea731d4c2ce ("tcp: Make SYN ACK RTO tunable by BPF
> programs with TFO").
>
> 3. was moved to reqsk_queue_hash_req() in the previous patch.
>
> Now, we always initialise req->timeout just before scheduling
> the SYN+ACK timer:
>
>   * For non-TFO SYN+ACK : reqsk_queue_hash_req()
>   * For TFO SYN+ACK     : tcp_fastopen_create_child()
>
> Let's remove the redundant initialisation of req->timeout in
> reqsk_alloc() and inet_reqsk_alloc().
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...gle.com>

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ