qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu list <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/1] rng backend: open backend in blocking mode
Date: Wed, 03 Apr 2013 15:08:40 -0500	[thread overview]
Message-ID: <87ehercr7b.fsf@codemonkey.ws> (raw)
In-Reply-To: <20130403062823.GA8995@amit.redhat.com>

Amit Shah <amit.shah@redhat.com> writes:

> On (Tue) 02 Apr 2013 [07:52:19], Anthony Liguori wrote:
>> Amit Shah <amit.shah@redhat.com> 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 :-)

Regards,

Anthony Liguori

>
>
> 		Amit

  reply	other threads:[~2013-04-03 20:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  9:25 [Qemu-devel] [PATCH 1/1] rng backend: open backend in blocking mode Amit Shah
2013-04-01 14:02 ` Anthony Liguori
2013-04-02 10:35   ` Amit Shah
2013-04-02 12:52     ` Anthony Liguori
2013-04-03  6:28       ` Amit Shah
2013-04-03 20:08         ` Anthony Liguori [this message]
2013-04-08  6:09           ` Amit Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehercr7b.fsf@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=amit.shah@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).