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: <54D7E677.5050708@iogearbox.net>
Date:	Sun, 08 Feb 2015 23:43:03 +0100
From:	Daniel Borkmann <daniel@...earbox.net>
To:	Josh Hunt <johunt@...mai.com>
CC:	Thomas Graf <tgraf@...g.ch>,
	Pablo Neira Ayuso <pablo@...filter.org>, kaber@...sh.net,
	netdev@...r.kernel.org, netfilter-devel@...r.kernel.org
Subject: Re: nft hash set expansion problem

On 02/08/2015 08:38 PM, Josh Hunt wrote:
> Nft hash sets are unable to expand past the initial # of buckets. This is b/c nft hash sets don't define the max_shift parameter and so rht_grow_above_75():
...
> diff --git a/lib/rhashtable.c b/lib/rhashtable.c
> index e96fc00..2c51617 100644
> --- a/lib/rhashtable.c
> +++ b/lib/rhashtable.c
> @@ -250,7 +250,7 @@ bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size)
>   {
>          /* Expand table when exceeding 75% load */
>          return atomic_read(&ht->nelems) > (new_size / 4 * 3) &&
> -              (ht->p.max_shift && atomic_read(&ht->shift) < ht->p.max_shift);
> +              (ht->p.max_shift ? atomic_read(&ht->shift) < ht->p.max_shift : 1);
>   }
>   EXPORT_SYMBOL_GPL(rht_grow_above_75);

This seems not correct as we want to have an upper limit for
rhashtable expansions. It's better to define a max_shift for
nftables, instead.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ