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-next>] [day] [month] [year] [list]
Date:   Thu, 19 May 2022 16:51:19 +0900
From:   Kuniyuki Iwashima <kuniyu@...zon.co.jp>
To:     <joannelkoong@...il.com>
CC:     <davem@...emloft.net>, <dsahern@...nel.org>, <edumazet@...gle.com>,
        <kafai@...com>, <kuba@...nel.org>, <kuniyu@...zon.co.jp>,
        <pabeni@...hat.com>, <richard_siegfried@...temli.org>,
        <yoshfuji@...ux-ipv6.org>, <netdev@...r.kernel.org>,
        <dccp@...r.kernel.org>
Subject: Re: [PATCH net-next v5 1/2] net: Add a second bind table hashed by port and address

From: Joanne Koong <joannelkoong@...il.com>
Date: Wed, 18 May 2022 16:19:11 -0700
> We currently have one tcp bind table (bhash) which hashes by port
> number only. In the socket bind path, we check for bind conflicts by
> traversing the specified port's inet_bind2_bucket while holding the
> bucket's spinlock (see inet_csk_get_port() and inet_csk_bind_conflict()).
> 
> In instances where there are tons of sockets hashed to the same port
> at different addresses, checking for a bind conflict is time-intensive
> and can cause softirq cpu lockups, as well as stops new tcp connections
> since __inet_inherit_port() also contests for the spinlock.
> 
> This patch proposes adding a second bind table, bhash2, that hashes by
> port and ip address. Searching the bhash2 table leads to significantly
> faster conflict resolution and less time holding the spinlock.
> 
> Signed-off-by: Joanne Koong <joannelkoong@...il.com>
> Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Acked-by: Kuniyuki Iwashima <kuniyu@...zon.co.jp>

To maintainers:
lore and patchwork seem to miss this version...?

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ