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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <A1CCE8E1-72B0-429C-BBD9-ABA31DE2EBE0@yandex-team.ru>
Date:   Mon, 8 Nov 2021 15:48:42 +0300
From:   Akhmat Karakotov <hmukos@...dex-team.ru>
To:     netdev@...r.kernel.org
Subject: Re: [RFC PATCH net-next 2/4] txhash: Add socket option to control TX
 hash rethink behavior

> On Oct 29, 2021, at 13:01, Akhmat Karakotov <hmukos@...dex-team.ru> wrote:
> 
>> 
>> On Oct 26, 2021, at 00:05, Eric Dumazet <eric.dumazet@...il.com> wrote:
>> 
>> 
>> 
>> On 10/25/21 1:35 PM, Akhmat Karakotov wrote:
>>> Add the SO_TXREHASH socket option to control hash rethink behavior per socket.
>>> When default mode is set, sockets disable rehash at initialization and use
>>> sysctl option when entering listen state. setsockopt() overrides default
>>> behavior.
>> 
>> What values are accepted, and what are their meaning ?
>> 
>> It seems weird to do anything in inet_csk_listen_start()
>> 
>> 
>> For sockets that have not used SO_TXREHASH
>> (this includes passive sockets where their parent did not use SO_TXREHASH),
>> the sysctl _current_ value should be used every time we consider a rehash.
> SO_TXREHASH_DEFAULT value means default behavior: for listening sockets
> the sysctl value is taken, while for others rehash is disabled. The motivation
> was to disallow hash rethink at the client-side to avoid connection timeout to
> anycast services (as was stated in cover letter).
> ENABLED and DISABLED values are for enforcing rehash option values.
> 
> To be honest I didn't quite understand how you propose to change patch behaviour.
> 
>> 
>>> #define SOCK_TXREHASH_DISABLED	0
>>> #define SOCK_TXREHASH_ENABLED	1
>>> 
>>> diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
>>> index 0d833b861f00..537a8532ff8a 100644
>>> --- a/net/core/net_namespace.c
>>> +++ b/net/core/net_namespace.c
>>> @@ -360,7 +360,7 @@ static int __net_init net_defaults_init_net(struct net *net)
>>> {
>>> 	net->core.sysctl_somaxconn = SOMAXCONN;
>>> 
>>> -	net->core.sysctl_txrehash = SOCK_TXREHASH_DISABLED;
>>> +	net->core.sysctl_txrehash = SOCK_TXREHASH_ENABLED;
>> 
>> This is very confusing.
>> 
> 
> Could you, please, elaborate what exactly is confusing?

Hi Eric,

I wonder if you have time to take a closer look at my last comments.

P. S.: resending this message without CC, because delivery system rejected it first time

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ