Re: drivers/char/random.c: variable type mismatch

From: Stephan Mueller
Date: Wed Nov 14 2012 - 12:58:23 EST


On 14.11.2012 18:52:53, +0100, H. Peter Anvin <hpa@xxxxxxxxx> wrote:

Hi Peter,

> On 11/14/2012 08:15 AM, Stephan Mueller wrote:
>>
>> I agree with the argument of correlation.
>>
>> So, if the reduction of values with a known lack of entropy is of
>> interest, why not change the jiffies variable type too? There we know
>> that only the lower 32 bits are really relevant. Therefore, wouldn't be
>> a structure of
>>
>> struct {
>> unsigned jiffies;
>> unsigned cycles;
>> unsigned num;
>> } sample;
>>
>> be more appropriate?
>>
>
> Probably. It doesn't make much difference, however.

Well, I guess it does. Because for every byte of the struct, the
input_pool is shuffled. Currently, it is shuffled with bytes known to
have no entropy. With the change, the number of bytes mixed into the
pool without entropy is reduced.
>
> -hpa
>

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