From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
"Nikos Mavrogiannopoulos" <nmav@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
Kashyap Chamarthy <kchamart@redhat.com>,
Laszlo Ersek <lersek@redhat.com>,
qemu-devel@nongnu.org, "Richard W.M. Jones" <rjones@redhat.com>
Subject: Re: [Qemu-devel] [RFC] Virtio RNG: Consider changing the default entropy source to /dev/urandom?
Date: Tue, 7 May 2019 10:53:00 -0500 [thread overview]
Message-ID: <4e9ff44c-fa61-71c5-f835-24047403ba67@redhat.com> (raw)
In-Reply-To: <20190507152211.GU27205@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1720 bytes --]
On 5/7/19 10:22 AM, Daniel P. Berrangé wrote:
> On Tue, May 07, 2019 at 11:59:05AM +0200, Nikos Mavrogiannopoulos wrote:
>> In terms of RHEL what is preferred is (1) use a crypto lib, and (2) if
>> that's not possible use getrandom(). That is summarized in this
>> article:
>>
>> https://www.redhat.com/en/blog/understanding-red-hat-enterprise-linux-random-number-generator-interface
>
> For QEMU this would mean re-writing the code to use qcrypto_random_bytes
> instead. This internal API is backed by a crypto lib if available,
> falling back to /dev/urandom or /dev/random on UNIX, or CryptGenRandom
> on Windows. We could add getrandom() support there too.
>
> The main question is whether to implement a new backends/rng-builtin.c
> or modify backends/rng-random.c so that it has a NULL filename by
> default, which would be taken as meaning use the qcrypto_random_bytes
> API. The latter benefits that all existing VMs which don't have a
> filename set would get the new behaviour. The latter has downside
> that it is not discoverable from mgmt apps, so they won't know if
> they can rely on it or not.
Alas, our example in misc.json is:
# -> { "execute": "object-add",
# "arguments": { "qom-type": "rng-random", "id": "rng1",
# "props": { "filename": "/dev/hwrng" } } }
# <- { "return": {} }
which is indeed one of the interfaces that evades introspection at the
present, so even if we made filename a StrOrNull, which would normally
show up in introspection when done on any other command, it is invisible
here. :(
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-05-07 15:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180921154323.GS28120@paraplu>
2019-05-02 18:02 ` [Qemu-devel] [RFC] Virtio RNG: Consider changing the default entropy source to /dev/urandom? Kashyap Chamarthy
2019-05-02 18:02 ` Kashyap Chamarthy
2019-05-03 7:59 ` Richard W.M. Jones
2019-05-03 7:59 ` Richard W.M. Jones
2019-05-07 9:59 ` Nikos Mavrogiannopoulos
2019-05-07 15:22 ` Daniel P. Berrangé
2019-05-07 15:53 ` Eric Blake [this message]
2019-05-07 17:14 ` Richard Henderson
2019-05-07 17:27 ` Daniel P. Berrangé
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=4e9ff44c-fa61-71c5-f835-24047403ba67@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=kchamart@redhat.com \
--cc=lersek@redhat.com \
--cc=nmav@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
/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).