lkml.org 
[lkml]   [2000]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: /dev/random blocks forever on 2.2.12 and 2.2.16
On Tue, Aug 08, 2000 at 02:20:41PM +0200, Oscar Roozen wrote:
> On Mon, Aug 07, 2000 at 07:41:37PM +0000, Miquel van Smoorenburg wrote:
> > >Yes, I can put a monkey behind the keyboard, but if somebody knows a
> > >better solution, please don't be shy. ;)
> > Use /dev/urandom
>
> You mean I do "ln -sf /dev/urandom /dev/random" ? Nah... ;)
>
> Several people sent me a private email sugesting to use urandom instead,
> but it's not what I use, it's about what all software on the machine uses.
> Should I patch SSH? Should I patch SSL? Or are they using urandom anyway?
>
> The issue here is that /dev/random is not working. Apparantly because
> add_interrupt_randomness is not called from the SMART2 driver. But then
> again, no add_*_randomness is called from any scsi/*.c driver.
>
> The only call to add_interrupt_randomness I can find is in */kernel/pci.c
> from handle_IRQ_event and I don't understand why this one never gets called
> on this machine. Also the only call to add_blkdev_randomness is in ide.c.
> Why is there no call from any of the scsi/*.c drivers?

I guess you just need to change the request_irq call in the SMART2 driver
to specify the SA_SAMPLE_RANDOM flag. I'm not sure if it is a good idea
though, because e.g. for bulk data transfers the intervals between RAID
interrupts are probably not very random and may add bogus numbers to your
entropy pool.

The randomness generation in scsi/* is also not used, because SMART2 bypasses
the SCSI layer completely. You could probably add add_blkdev_randomness to
the right function in SMART2, assuming the times are random enough (which is
not clear, e.g. the raid firmware could in theory smoothen it a lot)


-Andi


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.063 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site