From: Andi Kleen <andi@firstfloor.org>
To: Matt Mackall <mpm@selenic.com>
Cc: M Macnair <mmacnair@gmail.com>, Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org
Subject: Re: Seeding /dev/random not working
Date: 30 May 2007 00:08:22 +0200 [thread overview]
Message-ID: <p73veebe10p.fsf@bingen.suse.de> (raw)
In-Reply-To: <20070529202337.GH11166@waste.org>
Matt Mackall <mpm@selenic.com> writes:
> On Tue, May 29, 2007 at 05:44:37PM +0100, M Macnair wrote:
> > On 29 May 2007 18:58:59 +0200, Andi Kleen <andi@firstfloor.org> wrote:
> > >"M Macnair" <mmacnair@gmail.com> writes:
> > >>
> > >> Many distros ship with an init script that saves and restores the
> > >> entropy pool on startup and shutdown. The bit that interests me that
> > >> is called on startup is (my comments):
> > >> if [ -f $random_seed ]; then
> > >> cat $random_seed >/dev/urandom # should seed the pool
> > >^[OA
> > >Writing doesn't actually work; to get real accounted entropy for
> > >/dev/random
> > >you need to use a special ioctl. I ran into this problem some years ago
> > >and ended up writing http://www.muc.de/~ak/rndfeed.c
> > >
> > >-Andi
> >
> > If this doesn't work, then it seems to me as though all the
> > debian-esque distros that use equivalents of the above script are
> > wasting their time, and the man page recommending that technique (man
> > 4 random) is also wrong. Is that interpretation correct?
>
> Andi is incorrect. Writing does work and everything you write is mixed
Note I wrote accounted entropy above.
> into the pool. It's just not counted as entropy credit.
This means everything using /dev/random blocks. For me that
includes "does not work".
> This is as intended.
If the intention was to get everybody from stopping /dev/random
and moving them to /dev/urandom I guess it works well. Congratulations.
-Andi
next prev parent reply other threads:[~2007-05-29 21:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-29 11:53 Seeding /dev/random not working M Macnair
2007-05-29 13:15 ` Theodore Tso
2007-05-29 13:38 ` M Macnair
2007-05-29 14:14 ` Pavel Machek
2007-05-29 15:17 ` M Macnair
2007-05-29 15:31 ` Jesper Juhl
2007-05-29 16:30 ` Theodore Tso
2007-05-29 20:06 ` Folkert van Heusden
2007-05-29 17:46 ` Matt Mackall
2007-05-29 18:00 ` Matt Mackall
2007-05-29 19:23 ` Eric Dumazet
2007-05-29 19:35 ` Matt Mackall
2007-05-29 16:58 ` Andi Kleen
2007-05-29 16:44 ` M Macnair
2007-05-29 20:23 ` Matt Mackall
2007-05-29 22:08 ` Andi Kleen [this message]
2007-05-29 21:44 ` Matt Mackall
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=p73veebe10p.fsf@bingen.suse.de \
--to=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmacnair@gmail.com \
--cc=mpm@selenic.com \
/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