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: <ZQUjD0liUnH+ykKY@gondor.apana.org.au>
Date: Sat, 16 Sep 2023 11:37:51 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Alexander Aring <aahringo@...hat.com>
Cc: Network Development <netdev@...r.kernel.org>,
	Pablo Neira Ayuso <pablo@...filter.org>, kadlec@...filter.org,
	fw@...len.de, gfs2@...ts.linux.dev,
	David Teigland <teigland@...hat.com>, tgraf@...g.ch
Subject: Re: nft_rhash_walk, rhashtable and resize event

On Fri, Sep 15, 2023 at 10:05:06AM -0400, Alexander Aring wrote:
>
> My question is here? Is that allowed to do because a resize event may
> change the order how to iterate over a rhashtable.

Walking over an rhashtable should be a last resort.  There is
no guarantee of stability.

If you skip entries after a resize then you may miss entries.

If you want a stable walk, allocate an extra 8 bytes and use
a linked list.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ