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: <20210610225255.410-1-kuniyu@amazon.co.jp>
Date:   Fri, 11 Jun 2021 07:52:55 +0900
From:   Kuniyuki Iwashima <kuniyu@...zon.co.jp>
To:     <eric.dumazet@...il.com>
CC:     <andrii@...nel.org>, <ast@...nel.org>, <benh@...zon.com>,
        <bpf@...r.kernel.org>, <daniel@...earbox.net>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kafai@...com>,
        <kuba@...nel.org>, <kuni1840@...il.com>, <kuniyu@...zon.co.jp>,
        <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH v7 bpf-next 06/11] tcp: Migrate TCP_NEW_SYN_RECV requests at retransmitting SYN+ACKs.

From:   Eric Dumazet <eric.dumazet@...il.com>
Date:   Thu, 10 Jun 2021 22:21:00 +0200
> On 5/21/21 8:20 PM, Kuniyuki Iwashima wrote:
> > As with the preceding patch, this patch changes reqsk_timer_handler() to
> > call reuseport_migrate_sock() and inet_reqsk_clone() to migrate in-flight
> > requests at retransmitting SYN+ACKs. If we can select a new listener and
> > clone the request, we resume setting the SYN+ACK timer for the new req. If
> > we can set the timer, we call inet_ehash_insert() to unhash the old req and
> > put the new req into ehash.
> > 
> 
> ...
> 
> >  static void reqsk_migrate_reset(struct request_sock *req)
> >  {
> > +	req->saved_syn = NULL;
> > +	inet_rsk(req)->ireq_opt = NULL;
> >  #if IS_ENABLED(CONFIG_IPV6)
> > -	inet_rsk(req)->ipv6_opt = NULL;
> > +	inet_rsk(req)->pktopts = NULL;
> >  #endif
> >  }
> 
> This is fragile. 
> 
> Maybe instead :
> 
> #if IS_ENABLED(CONFIG_IPV6)
> 	inet_rsk(req)->ipv6_opt = NULL;
> 	inet_rsk(req)->pktopts = NULL;
> #else
> 	inet_rsk(req)->ireq_opt = NULL;
> #endif

I will fix this, thank you.

Also I will send a follow-up patch later to fix the same style in
inet_reqsk_alloc().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ