Re: [PATCH] random: Add "initialized" variable to proc

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 8:35 AM, Andy Lutomirski wrote: > On Thu, May 1, 2014 at 8:05 AM, wrote: >> On Wed, Apr 30, 2014 at 09:05:00PM -0700, H. Peter Anvin wrote: >>> >>> Giving the guest a seed would be highly useful, though. There are a >>> number of ways to do that; changing the boot protoco

Re: [PATCH] random: Add "initialized" variable to proc

2014-05-01 Thread Andy Lutomirski
On Thu, May 1, 2014 at 8:05 AM, wrote: > On Wed, Apr 30, 2014 at 09:05:00PM -0700, H. Peter Anvin wrote: >> >> Giving the guest a seed would be highly useful, though. There are a >> number of ways to do that; changing the boot protocol is probably >> only useful if Qemu itself bouts the kernel a

Re: [PATCH] random: Add "initialized" variable to proc

2014-05-01 Thread tytso
On Wed, Apr 30, 2014 at 09:05:00PM -0700, H. Peter Anvin wrote: > > Giving the guest a seed would be highly useful, though. There are a > number of ways to do that; changing the boot protocol is probably > only useful if Qemu itself bouts the kernel as opposed to an in-VM > bootloader. So how ab

Re: [PATCH] random: Add "initialized" variable to proc

2014-05-01 Thread Jason Cooper
On Wed, Apr 30, 2014 at 10:37:00PM -0700, H. Peter Anvin wrote: > > > On Apr 30, 2014, at 19:06, "Theodore Ts'o" wrote: > > > >> On Wed, Apr 30, 2014 at 01:52:35PM -0700, Andy Lutomirski wrote: > >> > >> 1. It simply doesn't work on my system. In particular, it never returns > >> entropy. It

Re: [PATCH] random: Add "initialized" variable to proc

2014-04-30 Thread H. Peter Anvin
To do something cross-arch putting it in memory and having something point to it is probably easiest, but again, with an in-VM boot loader the command line rather sucks. This then becomes a matter for device tree/ACPI with all that entails. In that sense it would be better to do something arch

Re: [PATCH] random: Add "initialized" variable to proc

2014-04-30 Thread H. Peter Anvin
Qemu is using /dev/random because there is no point in emptily feeding one prng from another. Giving the guest a seed would be highly useful, though. There are a number of ways to do that; changing the boot protocol is probably only useful if Qemu itself bouts the kernel as opposed to an in-V

Re: [PATCH] random: Add "initialized" variable to proc

2014-04-30 Thread Theodore Ts'o
On Wed, Apr 30, 2014 at 01:52:35PM -0700, Andy Lutomirski wrote: > > 1. It simply doesn't work on my system. In particular, it never returns > entropy. It just blocks forever. Why? Is this a bug in qemu? The host OS? The guest OS? It is qemu trying to use /dev/random instead of /dev/urandom

Re: [PATCH] random: Add "initialized" variable to proc

2014-04-30 Thread Andy Lutomirski
On 04/29/2014 11:26 AM, Theodore Ts'o wrote: > On Tue, Apr 29, 2014 at 07:51:08PM +0200, Florian Weimer wrote: >> >> I've got a (physical) machine where it happens after ten seconds, or much >> longer if there is no activity. >> >> I've seen cases where on the first boot of virtual machines, the SS

Re: [PATCH] random: Add "initialized" variable to proc

2014-04-29 Thread Theodore Ts'o
On Tue, Apr 29, 2014 at 07:51:08PM +0200, Florian Weimer wrote: > > I've got a (physical) machine where it happens after ten seconds, or much > longer if there is no activity. > > I've seen cases where on the first boot of virtual machines, the SSH key was > generated before the printk with the i

Re: [PATCH] random: Add "initialized" variable to proc

2014-04-29 Thread Florian Weimer
On 04/28/2014 11:41 PM, Theodore Ts'o wrote: On Mon, Apr 28, 2014 at 09:52:11PM +0200, Florian Weimer wrote: Before this change, you had to check kernel log messages to see if the non-blocking pool had been properly initialized. With this change, you can consult the file /proc/sys/kernel/random

Re: [PATCH] random: Add "initialized" variable to proc

2014-04-28 Thread Theodore Ts'o
On Mon, Apr 28, 2014 at 09:52:11PM +0200, Florian Weimer wrote: > Before this change, you had to check kernel log messages to see if the > non-blocking pool had been properly initialized. With this change, you > can consult the file /proc/sys/kernel/random/intialized instead. > > Signed-off-by: F

[PATCH] random: Add "initialized" variable to proc

2014-04-28 Thread Florian Weimer
Before this change, you had to check kernel log messages to see if the non-blocking pool had been properly initialized. With this change, you can consult the file /proc/sys/kernel/random/intialized instead. Signed-off-by: Florian Weimer --- drivers/char/random.c | 19 +++ 1 file