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: <YrTvq2ED+Xugqpyi@ZenIV>
Date:   Thu, 23 Jun 2022 23:56:43 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Chuck Lever <chuck.lever@...cle.com>
Cc:     linux-nfs@...r.kernel.org, netdev@...r.kernel.org,
        david@...morbit.com, tgraf@...g.ch, jlayton@...hat.com
Subject: Re: [PATCH RFC 28/30] NFSD: Set up an rhashtable for the filecache

On Wed, Jun 22, 2022 at 10:15:50AM -0400, Chuck Lever wrote:

> +static u32 nfsd_file_obj_hashfn(const void *data, u32 len, u32 seed)
> +{
> +	const struct nfsd_file *nf = data;
> +
> +	return jhash2((const u32 *)&nf->nf_inode,
> +		      sizeof_field(struct nfsd_file, nf_inode) / sizeof(u32),
> +		      seed);

Out of curiosity - what are you using to allocate those?  Because if
it's a slab, then middle bits of address (i.e. lower bits of
(unsigned long)data / L1_CACHE_BYTES) would better be random enough...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ