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] [day] [month] [year] [list]
Date:	Thu, 12 Dec 2013 10:46:02 -0800
From:	Christoph Hellwig <hch@...radead.org>
To:	Will Deacon <will.deacon@....com>
Cc:	linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk,
	torvalds@...ux-foundation.org
Subject: Re: [PATCH 1/2] dcache: allow word-at-a-time name hashing with
 big-endian CPUs

> +#ifdef __BIG_ENDIAN
> +	mask = ~(~0ul >> tcount*8);
> +#else
>  	mask = ~(~0ul << tcount*8);
> +#endif
>  	return unlikely(!!((a ^ b) & mask));

> +#ifdef __BIG_ENDIAN
> +	mask = ~(~0ul >> len*8);
> +#else
>  	mask = ~(~0ul << len*8);
> +#endif

This should really be a common helper.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ