From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965939AbcKNDpr (ORCPT ); Sun, 13 Nov 2016 22:45:47 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:45242 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752758AbcKNCER (ORCPT ); Sun, 13 Nov 2016 21:04:17 -0500 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Stephan Mueller" , "Theodore Ts'o" , "Stephan Mueller" Date: Mon, 14 Nov 2016 00:14:20 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 011/346] random: add interrupt callback to VMBus IRQ handler In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.39-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Stephan Mueller commit 4b44f2d18a330565227a7348844493c59366171e upstream. 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 Signed-off-by: Stephan Mueller Signed-off-by: Theodore Ts'o [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings --- drivers/char/random.c | 1 + drivers/hv/vmbus_drv.c | 3 +++ 2 files changed, 4 insertions(+) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -956,6 +956,7 @@ static void _xfer_secondary_pool(struct mix_pool_bytes(r, tmp, bytes, NULL); credit_entropy_bits(r, bytes*8); } +EXPORT_SYMBOL_GPL(add_interrupt_randomness); /* * Used as a workqueue function so that when the input pool is getting --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -795,6 +796,8 @@ int __vmbus_driver_register(struct hv_dr EXPORT_SYMBOL_GPL(__vmbus_driver_register); /** + + add_interrupt_randomness(HYPERVISOR_CALLBACK_VECTOR, 0); * vmbus_driver_unregister() - Unregister a vmbus's driver * @drv: Pointer to driver structure you want to un-register *