2003-05-31 15:23:50

by Philippe Amelant

[permalink] [raw]
Subject: 2.4.18 /dev/random problem

Hi

I have a compaq server with a little problem.
cat /proc/sys/kernel/random/entropy_avail is always 0
so /dev/random block on all read.

I have read some discussion about /dev/random on this list.
and if I understand /dev/urandom rely on /dev/random for providing good
randomness and /dev/random rely on server activity for it's entropy.

But I don't understand why my disk activity doesn't refill the entropy
counter. If I try to mount floppy I get some entropy but even updating
locate db does not provide any entropy ? Should I activate something in
disk driver ?

Thank
--
Philippe Amelant <[email protected]>


2003-05-31 22:16:20

by Andreas Dilger

[permalink] [raw]
Subject: Re: 2.4.18 /dev/random problem

On May 31, 2003 17:36 +0200, Philippe Amelant wrote:
> I have a compaq server with a little problem.
> cat /proc/sys/kernel/random/entropy_avail is always 0
> so /dev/random block on all read.
>
> I have read some discussion about /dev/random on this list.
> and if I understand /dev/urandom rely on /dev/random for providing good
> randomness and /dev/random rely on server activity for it's entropy.
>
> But I don't understand why my disk activity doesn't refill the entropy
> counter. If I try to mount floppy I get some entropy but even updating
> locate db does not provide any entropy ? Should I activate something in
> disk driver ?

Maybe you only have disk drives attached via CCISS or other special
RAID controller, and you do not use keyboard or mouse? It might be
that the RAID controller is not contributing to the entopy pool.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

2003-06-01 13:39:24

by Philippe Amelant

[permalink] [raw]
Subject: Re: 2.4.18 /dev/random problem

Le dim 01/06/2003 ? 00:29, Andreas Dilger a ?crit :
> On May 31, 2003 17:36 +0200, Philippe Amelant wrote:
> > I have a compaq server with a little problem.
> > cat /proc/sys/kernel/random/entropy_avail is always 0
> > so /dev/random block on all read.
> >
> > I have read some discussion about /dev/random on this list.
> > and if I understand /dev/urandom rely on /dev/random for providing good
> > randomness and /dev/random rely on server activity for it's entropy.
> >
> > But I don't understand why my disk activity doesn't refill the entropy
> > counter. If I try to mount floppy I get some entropy but even updating
> > locate db does not provide any entropy ? Should I activate something in
> > disk driver ?
>
> Maybe you only have disk drives attached via CCISS or other special
> RAID controller, and you do not use keyboard or mouse? It might be
> that the RAID controller is not contributing to the entopy pool.

You are right.
Pasi Pirhonen provide me this little patch
Maybe it could be useful for someone else....

--- linux/drivers/block/cpqarray.c Fri Apr 4 01:23:24 2003
+++ linux.TE/drivers/block/cpqarray.c Fri Apr 4 01:21:04 2003
@@ -517,7 +517,7 @@

hba[i]->access.set_intr_mask(hba[i], 0);
if (request_irq(hba[i]->intr, do_ida_intr,
- SA_INTERRUPT|SA_SHIRQ, hba[i]->devname, hba[i]))
+ SA_INTERRUPT|SA_SHIRQ|SA_SAMPLE_RANDOM, hba[i]->devname, hba[i]))
{

printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n",


thank for help