[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 1/1] rng backend: open backend in blocking mode

From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1/1] rng backend: open backend in blocking mode
Date: Wed, 03 Apr 2013 15:08:40 -0500
User-agent: Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)

Amit Shah <address@hidden> writes:

> On (Tue) 02 Apr 2013 [07:52:19], Anthony Liguori wrote:
>> Amit Shah <address@hidden> writes:
>> >> > backends/rng-random.c:44:entropy_available: assertion failed: (len != 
>> >> > -1)
>> >> >
>> >> > without this fix.
>> >> 
>> >> This fix would cause QEMU to block indefinitely which I don't think is
>> >> very good behavior.  I think a better solution would be:
> How about relegating it to glib functions, and hooking it up so that
> /dev/random is polled for data, and this function gets called when
> /dev/random has data to give out?  Sure, when a read is attempted,
> there might be no data available again, but we could then go back to
> polling.

The fix I posted minus the needed s/EINTR/EAGAIN/g is pretty straight
forward and IMHO the proper way to handle this.

Is there something you think is broken with it?  I guess I should turn
it into a real patch but I was hoping you would so I didn't have to
recreate the original problem :-)


Anthony Liguori

>               Amit

reply via email to

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