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: <20170425112356.GB11322@breakpoint.cc>
Date:   Tue, 25 Apr 2017 13:23:56 +0200
From:   Florian Westphal <fw@...len.de>
To:     Herbert Xu <herbert@...dor.apana.org.au>
Cc:     Florian Westphal <fw@...len.de>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] rhashtable: remove insecure_max_entries param

Herbert Xu <herbert@...dor.apana.org.au> wrote:
> Florian Westphal <fw@...len.de> wrote:
> > no users in the tree, insecure_max_entries is always set to
> > ht->p.max_size * 2 in rhtashtable_init().
> > 
> > Replace only spot that uses it with a ht->p.max_size check.
> 
> I'd suggest that as this needs to be computed every time we insert
> an element that you keep the value in struct rhashtable, but as an
> internal value as opposed to a paramter that is set by the user.

What extra cost?

The only change is that ht->nelems has to be right-shifted by one,
I don't think that warrants extra space in struct rhashtable, its
already way too large (I think we can reduce its size further).

Thanks,
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ