Re: [PATCH] Let DAC960 supply entropy to random pool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux