* Re: why no call to add_interrupt_randomness() on PPC?
[not found] <3B83C430.7E5F59C3@nortelnetworks.com.suse.lists.linux.kernel>
@ 2001-08-22 15:26 ` Andi Kleen
2001-08-22 15:37 ` Chris Friesen
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2001-08-22 15:26 UTC (permalink / raw)
To: Chris Friesen; +Cc: linux-kernel
Chris Friesen <cfriesen@nortelnetworks.com> writes:
> With all the talk about randomness, I went to see where my current system
> (2.2.19 on PPC) was getting random numbers from. I was kind of surprised to see
> that there is no call to add_interrupt_randomness() in arch/ppc/kernel/irq.c.
>
> Does anyone know why this call is not present in ppc_irq_dispatch_handler()?
> Would it be appropriate for me to make a patch for this? Who would be the
> appropriate person to send this to?
Nobody except for a few really obscure drivers use SA_SAMPLE_RANDOM
with their interrupt handlers (none on ppc as far as I can see) On
i386 all the gathering is normally done via the keyboard/mouse drivers
and the blk interface. The reason e.g. Macs normally do not gather
entropy is that they're using the new input layer for keyboard and
mouse which for some reason doesn't feed its events into the entropy
pool. I believe Wojtech did a patch for it, but I don't know if it has
been merged into the ppc tree yet.
-Andi
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: why no call to add_interrupt_randomness() on PPC?
2001-08-22 15:26 ` why no call to add_interrupt_randomness() on PPC? Andi Kleen
@ 2001-08-22 15:37 ` Chris Friesen
2001-08-22 15:47 ` Alex Bligh - linux-kernel
0 siblings, 1 reply; 4+ messages in thread
From: Chris Friesen @ 2001-08-22 15:37 UTC (permalink / raw)
To: Andi Kleen; +Cc: Friesen, Christopher [CAR:VS16:EXCH], linux-kernel
Andi Kleen wrote:
> Nobody except for a few really obscure drivers use SA_SAMPLE_RANDOM
> with their interrupt handlers (none on ppc as far as I can see) On
> i386 all the gathering is normally done via the keyboard/mouse drivers
> and the blk interface. The reason e.g. Macs normally do not gather
> entropy is that they're using the new input layer for keyboard and
> mouse which for some reason doesn't feed its events into the entropy
> pool. I believe Wojtech did a patch for it, but I don't know if it has
> been merged into the ppc tree yet.
The reason I'm looking at this is because I'm on a headless net-booting device.
We properly save and restore the entropy pool on startup/shutdown, but without
using network interrupts we have no way to generate more entropy. I was looking
at turning on SA_SAMPLE_RANDOM in our network driver, but then I realized that
it would have no effect because it isn't even supported on PPC.
So the upshot seems to be that there is no real reason why it isn't there, it
just hasn't been seen as required. Am I right?
Chris
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: why no call to add_interrupt_randomness() on PPC?
2001-08-22 15:37 ` Chris Friesen
@ 2001-08-22 15:47 ` Alex Bligh - linux-kernel
0 siblings, 0 replies; 4+ messages in thread
From: Alex Bligh - linux-kernel @ 2001-08-22 15:47 UTC (permalink / raw)
To: Chris Friesen, Andi Kleen
Cc: Friesen, Christopher [CAR:VS16:EXCH], linux-kernel,
Alex Bligh - linux-kernel
> I was looking at turning on SA_SAMPLE_RANDOM in
> our network driver, but then I realized that it would have no effect
> because it isn't even supported on PPC.
adding a call to add_interrupt_randomness() sounds like a good
idea if only for consistency and certainly does no harm (especially
if no net drivers use it), except that the timing is very coarsely
grained (jiffies) on PPC. It would be even better if you added
some cycle clock reading code to random.c for the PPC (in addition
to the i386 specific stuff) or better abstracted it all out into
arch directories.
Adding SA_SAMPLE_RANDOM to net devices: well, see other thread
ad-nauseam & make up your own mind :-)
--
Alex Bligh
^ permalink raw reply [flat|nested] 4+ messages in thread
* why no call to add_interrupt_randomness() on PPC?
@ 2001-08-22 14:39 Chris Friesen
0 siblings, 0 replies; 4+ messages in thread
From: Chris Friesen @ 2001-08-22 14:39 UTC (permalink / raw)
To: linux-kernel
With all the talk about randomness, I went to see where my current system
(2.2.19 on PPC) was getting random numbers from. I was kind of surprised to see
that there is no call to add_interrupt_randomness() in arch/ppc/kernel/irq.c.
Does anyone know why this call is not present in ppc_irq_dispatch_handler()?
Would it be appropriate for me to make a patch for this? Who would be the
appropriate person to send this to?
Thanks,
Chris
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-08-22 15:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3B83C430.7E5F59C3@nortelnetworks.com.suse.lists.linux.kernel>
2001-08-22 15:26 ` why no call to add_interrupt_randomness() on PPC? Andi Kleen
2001-08-22 15:37 ` Chris Friesen
2001-08-22 15:47 ` Alex Bligh - linux-kernel
2001-08-22 14:39 Chris Friesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox