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]
Message-ID: <507D8712.4050008@zytor.com>
Date:	Tue, 16 Oct 2012 09:10:58 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Theodore Ts'o <tytso@....edu>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	greg@...ah.com, w@....eu, ewust@...ch.edu, zakir@...ch.edu,
	mpm@...enic.com, nadiah@...ucsd.edu, jhalderm@...ch.edu,
	tglx@...utronix.de, davem@...emloft.net, mingo@...nel.org,
	DJ Johnston <dj.johnston@...el.com>, stable@...r.kernel.org
Subject: Re: [PATCH RFC] random: Account for entropy loss due to overwrites

On 10/16/2012 08:53 AM, Theodore Ts'o wrote:
> 
> ... and it looks like include/linux/log2.h already has a definition
> for ilog2() which should definitely work for all versions of gcc, so
> we could do this instead:
> 
> #define shiftbits(w)	(ilog2((w)) + 5)
> 
> 	/* x^128 + x^103 + x^76 + x^51 +x^25 + x + 1 -- 105 */
> 	{ shiftbits(128), 103,	76,	51,	25,	1 },
> 	/* x^32 + x^26 + x^20 + x^14 + x^7 + x + 1 -- 15 */
> 	{ shiftbits(32),  26,	20,	14,	7,	1 },
> 

OK, works for me.  I'll rev the patch later this week.

	-hpa


--
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