[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200805191928.13043.rusty@rustcorp.com.au>
Date: Mon, 19 May 2008 19:28:12 +1000
From: Rusty Russell <rusty@...tcorp.com.au>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: "H. Peter Anvin" <hpa@...or.com>, Theodore Tso <tytso@....edu>,
Herbert Xu <herbert@...dor.apana.org.au>,
Jeff Garzik <jeff@...zik.org>,
LKML <linux-kernel@...r.kernel.org>,
virtualization@...ts.linux-foundation.org,
Christian Borntraeger <borntraeger@...ibm.com>,
Matt Mackall <mpm@...enic.com>,
Johannes Berg <johannes@...solutions.net>
Subject: Re: [PATCH 2/2] lguest: virtio-rng support
On Monday 19 May 2008 19:10:49 Jeremy Fitzhardinge wrote:
> Rusty Russell wrote:
> > On Saturday 17 May 2008 17:47:01 Jeremy Fitzhardinge wrote:
> >> But the host->guest protocol should include the number of bits estimated
> >> entropy along with the bits themselves.
> >
> > If we go down that path, we have to come up with a way of feeding that
> > information to guest userspace. Patches welcome. If we meanwhile assume
> > entropy == #bits, it fits the current /dev/hwrng model, and we can add an
> > entropy count later if we want to change that.
>
> Really? Wouldn't guest userspace just use /dev/random as usual, which I
> think does have an ioctl to give that kind of information? And the
> interfaces do allow things injecting entropy into the kernel pool to
> provide entropy estimates along with the actual bits themselves.
Unfortunately not. Hardware randomness devices export /dev/hwrng, and it's up
to userspace to feed that into /dev/random (or not). That's usually done by
rngd, which at least on my system, assumes 1 bit of entropy per bit of data
from /dev/hwrng by default.
I was a little surprised that this decision was exported to userspace, but if
you're not prepared to unconditionally trust hw rngs, it makes sense to palm
it off. We could write a boutique device for virtualization which *did* feed
directly, but that would be a little gauche.
Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists