From: Amit Shah <amit.shah@redhat.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org,
Anthony Liguori <anthony@codemonkey.ws>,
Virtualization List <virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH 1/1] virtio: rng: disallow multiple device registrations, fixes crashes
Date: Thu, 7 Mar 2013 13:53:01 +0530 [thread overview]
Message-ID: <20130307082301.GA4135@amit.redhat.com> (raw)
In-Reply-To: <8762149fxk.fsf@rustcorp.com.au>
(CC'ing lkml and hpa for thoughts on multiple active hwrng devices)
On (Thu) 07 Mar 2013 [12:06:31], Rusty Russell wrote:
> Amit Shah <amit.shah@redhat.com> writes:
> > The code currently only supports one virtio-rng device at a time.
> > Invoking guests with multiple devices causes the guest to blow up.
> >
> > Check if we've already registered and initialised the driver. Also
> > cleanup in case of registration errors or hot-unplug so that a new
> > device can be used.
> >
> > Reported-by: Peter Krempa <pkrempa@redhat.com>
> > Reported-by: <yunzheng@redhat.com>
> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
> > ---
> >
> > Also valid for stable?
>
> Yes. We could fix virtio-rng to allow multiple rngs, but of course it
> will fail anyway since hwrng wants unique names. And changing the name
> to be virtio-%u will probably break things, for no real upside.
The hwrng interface also sources its input from one active device at a
time, and that's selectable via a sysfs interface.
If we extend the hwrng interface to source from multiple devices at
the same time, and taking in whatever it gets from whichever device
has data to give, wlil having multiple virtio devices make sense.
But, several active hwrng devices has its own set of problems: on need
for entropy, which device do you ask from? Just asking all devices
for precious entropy, when only one could give out all of it is not
productive (or secure?).
> Applied, and Cc:stable added.
Thanks!
Amit
prev parent reply other threads:[~2013-03-07 8:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 8:13 [PATCH 1/1] virtio: rng: disallow multiple device registrations, fixes crashes Amit Shah
2013-03-07 1:06 ` Rusty Russell
2013-03-07 8:23 ` Amit Shah [this message]
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=20130307082301.GA4135@amit.redhat.com \
--to=amit.shah@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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).