All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: "Linus Torvalds" <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Cc: hpa@linux.intel.com, Amos Kong <akong@redhat.com>,
	ricardo.neri-calderon@linux.intel.com, tytso@mit.edu,
	Amit Shah <amit.shah@redhat.com>
Subject: [PATCH] virtio: rng: add derating factor for use by hwrng core
Date: Thu, 14 Aug 2014 04:39:07 +0930	[thread overview]
Message-ID: <87zjf88awc.fsf@rustcorp.com.au> (raw)

The khwrngd thread is started when a hwrng device of sufficient
quality is registered.  The virtio-rng device is backed by the
hypervisor, and we trust the hypervisor to provide real entropy.

A malicious hypervisor is a scenario that's irrelevant -- such a setup
is bound to cause all sorts of badness, and a compromised hwrng is not
the biggest threat.

Given this, we are certain the quality of randomness we receive is
perfectly trustworthy.  Hence, we use 100% for the factor, indicating
maximum confidence in the source.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
Pretty small and contained patch; would be great if it is picked up for
3.17.

v2: re-word commit msg

[Agreed, re-sending to Linus with SOB before jumping on plane]
---
 drivers/char/hw_random/virtio-rng.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/char/hw_random/virtio-rng.c
b/drivers/char/hw_random/virtio-rng.c
index 0027137..2e3139e 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -116,6 +116,7 @@ static int probe_common(struct virtio_device *vdev)
		.cleanup = virtio_cleanup,
		.priv = (unsigned long)vi,
		.name = vi->name,
+		.quality = 1000,
	};
	vdev->priv = vi;


             reply	other threads:[~2014-08-13 20:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 19:09 Rusty Russell [this message]
2014-08-13 20:49 ` [PATCH] virtio: rng: add derating factor for use by hwrng core H. Peter Anvin
2014-08-13 22:44 ` Theodore Ts'o
2014-08-14 18:51 ` Amos Kong

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=87zjf88awc.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.