Re: virtio-rng only returns zeros with CONFIG_HW_RANDOM=m

Herbert Xu
2013-03-10T08:26:54Z

On Wed, Feb 27, 2013 at 11:56:55AM +1030, Rusty Russell wrote:
>
> OK, I looked at doing a kmalloc and copy in virtio_rng, but it's very
> inelegant (we don't know what size of buffer to allocate).

As the hwrng API allows you to return any number of bytes, you
can just go back to the old virtio-rng code that did the 64-byte
buffer and return a maximum of 64 bytes each time.

Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt