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>] [day] [month] [year] [list]
Message-ID: <20151021181316.25618.qmail@ns.horizon.com>
Date:	21 Oct 2015 14:13:16 -0400
From:	"George Spelvin" <linux@...izon.com>
To:	hpa@...ux.intel.com
Cc:	linux-kernel@...r.kernel.org, tytso@....edu
Subject: Re: Thought about credit_entropy_bits() math

(Resend because I can't spell "kernel.org".)

H. Peter Anvin wrote:
> The main advantage with this approximation is that it doesn't need a
> multiplication instruction.  Instead, it can be implemented with two
> shifts and a subtract on hardware for which multiplication is slow.

Er...  I'm as addicted to micro-optimization as anyone, which is why
I posted all those various approximations, but I'm taking about going
from one to two, not zero to one.

The current approximaion is used right in the middle of a non-constant
multiply:
	unsigned int add = ((pool_size - entropy_count)*anfrac*3) >> s;


(Does Linux even run on any hardware without a multiply instruction?
There are tons of multiplies all over the scheduler.  The worst cases
I can think of just have slow bitwise multiplies: the nommu 68000 and
SPARCv7's multiply step.)
--
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