public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Problem with random.c and PPC
@ 2002-08-16 10:00 Jon Burgess
  2002-08-16 19:52 ` Oliver Xymoron
  0 siblings, 1 reply; 33+ messages in thread
From: Jon Burgess @ 2002-08-16 10:00 UTC (permalink / raw)
  To: henrique; +Cc: linux-kernel



>BTW, does anyone know where I can found the patch to get randomness from the
>network cards interrupt ?

Add the flag SA_SAMPLE_RANDOM into the request_irq() flags in the driver for
whichever interrupt source you want to use
e.g. from drivers/net/3c523.c

     ret = request_irq(dev->irq, &elmc_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM,
                 dev->name, dev);


     Jon



^ permalink raw reply	[flat|nested] 33+ messages in thread
* Problem with random.c and PPC
@ 2002-08-15 16:10 henrique
  0 siblings, 0 replies; 33+ messages in thread
From: henrique @ 2002-08-15 16:10 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org

Hi Andreas !!!

You've got the point. My system is diskless, keyboardless and mouseless
therefore I will never get randomness without the patch you talked about.

BTW, does anyone know where I can found the patch to get randomness from the 
network cards interrupt ?

regards
Henrique

On Thursday 15 August 2002 06:25 pm, Andreas Dilger wrote:
> On Aug 15, 2002  15:14 +0000, henrique wrote:
> > Hello !!!
> >
> > I am trying to use a program (ipsec newhostkey) that uses the random
> > device provided by the linux-kernel. In a x86 machine the program works
> > fine but when I tried to run the program in a PPC machine it doesn't
> > work.
> >
> > Looking carefully I have discovered that the problem is in the driver
> > random.c. When the program tries to read any amount of data it locks and
> > never returns. It happens because the variable
> > "random_state->entropy_count" is always zero, that is, any random number
> > is generated at all !!!??.
> >
> > Does anyone know anything about this problem ? Any sort of help is very
> > welcomed.
>
> Maybe the PPC keyboard/mouse drivers do not add randomness?  You should
> also get randomness from disk I/O.  If your PPC system is diskless,
> mouseless, and keyboardless, there is also a patch for 2.4 which allows
> you to get randomness from network card interrupts, which is good enough
> for all but the most incredibly paranoid people.
>
> Cheers, Andreas

--

-------------------------------------------------------

-- 
---
Henrique Gobbi
Software Engineer
+55 11 50333339
Cyclades Corporation - The Leader in Linux Connectivity

^ permalink raw reply	[flat|nested] 33+ messages in thread
* Problem with random.c and PPC
@ 2002-08-15 15:14 henrique
  2002-08-15 18:25 ` Andreas Dilger
  0 siblings, 1 reply; 33+ messages in thread
From: henrique @ 2002-08-15 15:14 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org

Hello !!!

I am trying to use a program (ipsec newhostkey) that uses the random device 
provided by the linux-kernel. In a x86 machine the program works fine but 
when I tried to run the program in a PPC machine it doesn't work.

Looking carefully I have discovered that the problem is in the driver 
random.c. When the program tries to read any amount of data it locks and 
never returns. It happens because the variable  "random_state->entropy_count" 
is always zero, that is, any random number is generated at all !!!??.

Does anyone know anything about this problem ? Any sort of help is very 
welcomed.

Thanks
Henrique Gobbi


^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2002-08-22 17:21 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-16 10:00 Problem with random.c and PPC Jon Burgess
2002-08-16 19:52 ` Oliver Xymoron
2002-08-16 17:51   ` henrique
2002-08-16 21:21     ` Ruth Ivimey-Cook
2002-08-17  0:47       ` Oliver Xymoron
2002-08-17  0:45     ` Oliver Xymoron
2002-08-17  6:05       ` Andreas Dilger
2002-08-17  7:23         ` Oliver Xymoron
2002-08-17  9:09           ` Andreas Dilger
2002-08-17 16:56             ` Oliver Xymoron
2002-08-19  9:29           ` Marco Colombo
2002-08-19 14:02             ` Oliver Xymoron
2002-08-19 15:11               ` Marco Colombo
2002-08-19 15:29                 ` Oliver Xymoron
2002-08-19 16:20                   ` Marco Colombo
2002-08-19 16:33                     ` Oliver Xymoron
2002-08-19 20:23                       ` Marco Colombo
2002-08-22  3:16             ` David Wagner
2002-08-16 20:52   ` Chris Friesen
2002-08-17  0:29     ` Oliver Xymoron
2002-08-22  3:19     ` David Wagner
2002-08-22 15:40       ` Chris Friesen
2002-08-22 17:25       ` Remco Post
  -- strict thread matches above, loose matches on Subject: below --
2002-08-15 16:10 henrique
2002-08-15 15:14 henrique
2002-08-15 18:25 ` Andreas Dilger
2002-08-15 19:03   ` Tom Rini
2002-08-15 19:59     ` Andreas Dilger
2002-08-15 21:04       ` Tom Rini
2002-08-16  1:50         ` H. Peter Anvin
2002-08-16 16:33           ` Oliver Xymoron
2002-08-16 16:28         ` Oliver Xymoron
     [not found]           ` <20020816170126.GD26993@opus.bloom.county>
2002-08-16 17:15             ` Oliver Xymoron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox