[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: randomness

From: Roland McGrath
Subject: Re: randomness
Date: Fri, 22 Jun 2001 23:12:05 -0400 (EDT)

> > You only have to guarantee that the next read on the device works.  If
> > there are multiple readers, then it's their problem to race to get their
> > io_read in first and either block or miss out if they don't get it.
> How convenient!

Speaking of convenience, it wouldn't hurt to try to move the common parts
of asynchronous io server work into some libiohelp functions.  streamio,
term, and your new translator, all have to do the same stuff as far as
blocking user io_reads, io_select, etc.  The common work can probably be
factored out in some reasonable way.

> I did include it in my gnumach character device port.  It was the first one
> which worked, actually.  I could revive the patch, but we all know it is the
> wrong way to go.  What is the story with character devices in OSKit?

There just aren't really any of them implemented.  If I had a spare machine
so I could get back into kernel hacking, I would do some oskit device glue
for linux and/or freebsd character drivers and make those work in oskit-mach.
Remember, oskit-mach has only a half-assed keyboard/console support and no
proper serial port support at all, until this gets done.

> Yes, there could be a worker thread gathering random from various sources. 
> It could even make an attempt to query vmstat etc for some random (there
> already exists such a thing as a plugin in gnupg).  

> The one issue there is that you'd want it to run as early as possible, so
> you'd want to wake up /dev/random at startup.  I thought it would be nice
> to have egd write to /dev/random, as this would automatically start the
> active translator as well, but /dev/random polling from some fifo would
> also work of course.

It's canonical in Linux to store a file of gathered randomness on shutdown
and prime /dev/random with this on boot; i.e. "cat seed-file > /dev/random".
This will start the passive translator up.

> There is also a nice feature of writing a seed file.  This will be
> absolutely cool together with the shutdown notification.

I assume you are just talking about what is canonically done on Linux.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]