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

2013-05-30 Thread Jens Axboe
On Thu, May 30 2013, Rusty Russell wrote: > Jens Axboe writes: > > On Wed, Feb 27 2013, Rusty Russell wrote: > >> Aurelien Jarno writes: > >> > Hi, > >> > > >> > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 > >> > built with CONFIG_HW_RANDOM=m. This is a bit much too pre

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

2013-05-29 Thread Rusty Russell
Jens Axboe writes: > On Wed, Feb 27 2013, Rusty Russell wrote: >> Aurelien Jarno writes: >> > Hi, >> > >> > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 >> > built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a >> > random generator ;-). >> >> Wow. F

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

2013-03-10 Thread Herbert Xu
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-rn

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

2013-02-27 Thread Rusty Russell
Aurelien Jarno writes: > On Wed, Feb 27, 2013 at 11:56:55AM +1030, Rusty Russell wrote: >> Aurelien Jarno writes: >> > Hi, >> > >> > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 >> > built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a >> > random gene

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

2013-02-27 Thread Rusty Russell
Jens Axboe writes: > On Wed, Feb 27 2013, Rusty Russell wrote: >> Subject: scatterlist: sg_set_buf() argument must be in linear mapping. >> >> Signed-off-by: Rusty Russell >> >> diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h >> index 4bd6c06..9365375 100644 >> --- a/incl

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

2013-02-27 Thread Aurelien Jarno
On Wed, Feb 27, 2013 at 11:56:55AM +1030, Rusty Russell wrote: > Aurelien Jarno writes: > > Hi, > > > > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 > > built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a > > random generator ;-). > > > > The reason fo

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

2013-02-27 Thread Jens Axboe
On Wed, Feb 27 2013, Rusty Russell wrote: > Aurelien Jarno writes: > > Hi, > > > > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 > > built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a > > random generator ;-). > > Wow. Fortunately, all of SLES, RHEL,

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

2013-02-27 Thread Aurelien Jarno
On Wed, Feb 27, 2013 at 10:43:37AM +1030, Rusty Russell wrote: > Aurelien Jarno writes: > > Hi, > > > > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 > > built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a > > random generator ;-). > > Wow. Fortunatel

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

2013-02-26 Thread Ben Hutchings
On Wed, 2013-02-27 at 10:43 +1030, Rusty Russell wrote: > Aurelien Jarno writes: > > Hi, > > > > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 > > built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a > > random generator ;-). > > Wow. Fortunately, all

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

2013-02-26 Thread Rusty Russell
Aurelien Jarno writes: > Hi, > > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 > built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a > random generator ;-). > > The reason for that is virtio expects guest real addresses, while > rng_core.ko (ie when bui

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

2013-02-26 Thread Rusty Russell
Aurelien Jarno writes: > Hi, > > I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 > built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a > random generator ;-). Wow. Fortunately, all of SLES, RHEL, Ubuntu or Fedora set CONFIG_HW_RANDOM=y. What do they kn

virtio-rng only returns zeros with CONFIG_HW_RANDOM=m

2013-02-24 Thread Aurelien Jarno
Hi, I have noticed that virtio-rng only returns zero for kernels >= 2.6.33 built with CONFIG_HW_RANDOM=m. This is a bit much too predictable for a random generator ;-). The reason for that is virtio expects guest real addresses, while rng_core.ko (ie when built as a module) is passing a vmalloced