From: Stephan Mueller <smueller@chronox.de>
To: herbert@gondor.apana.org.au
Cc: Ted Tso <tytso@mit.edu>, Andi Kleen <andi@firstfloor.org>,
sandyinchina@gmail.com,
Jason Cooper <cryptography@lakedaemon.net>,
John Denker <jsd@av8n.com>, "H. Peter Anvin" <hpa@zytor.com>,
joe@perches.com, Pavel Machek <pavel@ucw.cz>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 5/5] random: add interrupt callback to VMBus IRQ handler
Date: Fri, 29 Apr 2016 08:24:43 +0200 [thread overview]
Message-ID: <2028519.e7rxLlMInB@positron.chronox.de> (raw)
In-Reply-To: <2346517.m8UHYeMDSf@positron.chronox.de>
The Hyper-V Linux Integration Services use the VMBus implementation for
communication with the Hypervisor. VMBus registers its own interrupt
handler that completely bypasses the common Linux interrupt handling.
This implies that the interrupt entropy collector is not triggered.
This patch adds the interrupt entropy collection callback into the VMBus
interrupt handler function.
Signed-off-by: Stephan Mueller <stephan.mueller@atsec.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
---
drivers/char/random.c | 1 +
drivers/hv/vmbus_drv.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 92c2174..9632976 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -947,6 +947,7 @@ void add_interrupt_randomness(int irq, int irq_flags)
/* award one bit for the contents of the fast pool */
credit_entropy_bits(r, credit + 1);
}
+EXPORT_SYMBOL_GPL(add_interrupt_randomness);
#ifdef CONFIG_BLOCK
void add_disk_randomness(struct gendisk *disk)
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 64713ff..9af61bb 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -41,6 +41,7 @@
#include <linux/ptrace.h>
#include <linux/screen_info.h>
#include <linux/kdebug.h>
+#include <linux/random.h>
#include "hyperv_vmbus.h"
static struct acpi_device *hv_acpi_dev;
@@ -801,6 +802,8 @@ static void vmbus_isr(void)
else
tasklet_schedule(hv_context.msg_dpc[cpu]);
}
+
+ add_interrupt_randomness(HYPERVISOR_CALLBACK_VECTOR, 0);
}
--
2.5.5
prev parent reply other threads:[~2016-04-29 6:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 6:21 [PATCH v3 0/5] /dev/random - a new approach Stephan Mueller
2016-04-29 6:22 ` [PATCH v3 1/5] crypto: DRBG - externalize DRBG functions for LRNG Stephan Mueller
2016-04-29 6:23 ` [PATCH v3 2/5] random: conditionally compile code depending on LRNG Stephan Mueller
2016-04-29 6:23 ` [PATCH v3 3/5] crypto: Linux Random Number Generator Stephan Mueller
2016-04-29 6:24 ` [PATCH v3 4/5] crypto: LRNG - enable compile Stephan Mueller
2016-04-29 6:24 ` Stephan Mueller [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=2028519.e7rxLlMInB@positron.chronox.de \
--to=smueller@chronox.de \
--cc=andi@firstfloor.org \
--cc=cryptography@lakedaemon.net \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=joe@perches.com \
--cc=jsd@av8n.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=sandyinchina@gmail.com \
--cc=tytso@mit.edu \
/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
all inboxes | Powered by JetHome®