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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150105130514.GA15499@casper.infradead.org>
Date:	Mon, 5 Jan 2015 13:05:14 +0000
From:	Thomas Graf <tgraf@...g.ch>
To:	Ying Xue <ying.xue@...driver.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] rhashtable: involve rhashtable_lookup_insert
 routine

On 01/05/15 at 07:33pm, Ying Xue wrote:
> Involve a new function called rhashtable_lookup_insert() which makes
> lookup and insertion atomic under bucket lock protection, helping us
> avoid to introduce an extra lock when we search and insert an object
> into hash table.
> 
> Signed-off-by: Ying Xue <ying.xue@...driver.com>
> Signed-off-by: Thomas Graf <tgraf@...g.ch>

Thanks for putting this around so quickly and thanks for testing.
I think this looks good. You might be able to factor out some code
from rhashtable_insert() to avoid duplication so we reduce the risk
of fixing a bug for one function but not the other.

I see some further optimization potential when we need to calculate
the hash for both the old and new table. We can introduce a new
function which provides both based on a single hash iteration.
However, we should do that in a separate patch.
--
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