mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephan Mueller <stephan.mueller@atsec.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: drivers/char/random.c: variable type mismatch
Date: Wed, 14 Nov 2012 18:58:30 +0100	[thread overview]
Message-ID: <50A3DBC6.6050101@atsec.com> (raw)
In-Reply-To: <50A3DA75.60208@zytor.com>

On 14.11.2012 18:52:53, +0100, H. Peter Anvin <hpa@zytor.com> 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
> 


      reply	other threads:[~2012-11-14 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-08  0:32 Stephan Mueller
2012-11-08 11:47 ` Theodore Ts'o
2012-11-14 16:15   ` Stephan Mueller
2012-11-14 17:52     ` H. Peter Anvin
2012-11-14 17:58       ` Stephan Mueller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A3DBC6.6050101@atsec.com \
    --to=stephan.mueller@atsec.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome