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
On Mon, Oct 15, 2012 at 09:45:23PM -0700, H. Peter Anvin wrote:
>
> Or we could compute poolwords (and poolbits, and poolbytes) from it,
> since shifts generally are cheap. I don't strongly care, whatever your
> preference is.
We are already calculating poolbits from poolwords:
#define POOLBITS
On 10/15/2012 09:08 PM, Theodore Ts'o wrote:
> On Sat, Sep 29, 2012 at 12:47:04PM -0700, H. Peter Anvin wrote:
>>> -static struct poolinfo {
>>> +static const struct poolinfo {
>>> + int poolshift; /* log2(POOLBITS) */
>>> int poolwords;
>>> int tap1, tap2, tap3, tap4, tap5;
>
>
On Sat, Sep 29, 2012 at 12:47:04PM -0700, H. Peter Anvin wrote:
> >-static struct poolinfo {
> >+static const struct poolinfo {
> >+int poolshift; /* log2(POOLBITS) */
> > int poolwords;
> > int tap1, tap2, tap3, tap4, tap5;
Poolshift is duplicated information; it's just log2(
Ping on this patch?
-hpa
On 08/13/2012 10:26 AM, H. Peter Anvin wrote:
From: "H. Peter Anvin"
When we write entropy into a non-empty pool, we currently don't
account at all for the fact that we will probabilistically overwrite
some of the entropy in that pool. This means that unless
On 08/15/2012 12:30 PM, Matt Mackall wrote:
> On Mon, 2012-08-13 at 10:26 -0700, H. Peter Anvin wrote:
>> From: "H. Peter Anvin"
>>
>> When we write entropy into a non-empty pool, we currently don't
>> account at all for the fact that we will probabilistically overwrite
>> some of the entropy in t
On Mon, 2012-08-13 at 10:26 -0700, H. Peter Anvin wrote:
> From: "H. Peter Anvin"
>
> When we write entropy into a non-empty pool, we currently don't
> account at all for the fact that we will probabilistically overwrite
> some of the entropy in that pool.
Technically, no, nothing is overwritten
From: "H. Peter Anvin"
When we write entropy into a non-empty pool, we currently don't
account at all for the fact that we will probabilistically overwrite
some of the entropy in that pool. This means that unless the pool is
fully empty, we are currently *guaranteed* to overestimate the amount
o
8 matches
Mail list logo