From: Matt Mackall <mpm@selenic.com>
To: "Anders K. Pedersen" <akp@cohaesio.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Let DAC960 supply entropy to random pool
Date: Mon, 6 Mar 2006 11:44:23 -0600 [thread overview]
Message-ID: <20060306174423.GY14549@waste.org> (raw)
In-Reply-To: <1141644324.3627.15.camel@homer.cohaesio.com>
On Mon, Mar 06, 2006 at 12:25:24PM +0100, Anders K. Pedersen wrote:
> On Mon, 2006-02-27 at 01:05, Matt Mackall wrote:
> > On Thu, Feb 23, 2006 at 05:44:38PM +0100, Anders K. Pedersen wrote:
> > > We have a couple of servers with Mylex RAID controllers (handled by the
> > > DAC960 block device driver). There's normally no keyboard or mouse
> > > attached, and neither the DAC960 nor the NIC driver (e100) provides
> > > entropy to the random pool, so it was impossible to get any data from
> > > /dev/random.
> >
> > Doesn't the add_disk_randomness call in ll_rw_blk.c suffice? This is
> > the proper path for disks to add entropy.
>
> Apparently the add_disk_randomness call in ll_rw_blk.c isn't invoked for
> my setup. There were absolutely no data available from /dev/random for
> more than an hour (with heavy disk activity) before applying the
> dac960.c patch, and after applying it, random data were instantly
> available.
Ok, we probably want this patch. Please test.
Add disk entropy in DAC960 request completions.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Index: 2.6/drivers/block/DAC960.c
===================================================================
--- 2.6.orig/drivers/block/DAC960.c 2006-03-01 23:32:32.000000000 -0600
+++ 2.6/drivers/block/DAC960.c 2006-03-06 11:41:45.000000000 -0600
@@ -41,6 +41,7 @@
#include <linux/timer.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/random.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include "DAC960.h"
@@ -3463,7 +3464,7 @@ static inline boolean DAC960_ProcessComp
Command->SegmentCount, Command->DmaDirection);
if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) {
-
+ add_disk_randomness(Request->rq_disk);
end_that_request_last(Request, UpToDate);
if (Command->Completion) {
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2006-03-06 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-23 16:44 Anders K. Pedersen
2006-02-27 0:05 ` Matt Mackall
2006-03-06 11:25 ` Anders K. Pedersen
2006-03-06 17:44 ` Matt Mackall [this message]
2006-03-07 13:18 ` Anders K. Pedersen
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=20060306174423.GY14549@waste.org \
--to=mpm@selenic.com \
--cc=akp@cohaesio.com \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome