All of lore.kernel.org
 help / color / mirror / Atom feed
* b43: /dev/hwrng isn't random
@ 2013-02-06  4:47 Christian Kujau
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Kujau @ 2013-02-06  4:47 UTC (permalink / raw)
  To: b43-dev

Hi,

while playing around with this BCM4306 (b43) wifi NIC (and reporting some 
lockdep issues, [0]), I noticed that the chip could be used as a HWRNG and 
driver support for this has been added years ago - great, I never knew!

But when attempting to read from /dev/hwrng (b43 is loaded, interface is 
up & running), the device returns not random bytes, but:

$ head -c 1000 /dev/hwrng | od -x
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0001740 0000 0000 0000 0000
0001750

I've used a custom-built 3.8-rc6 and a stock Debian 3.2.0-4, same results. 
I should add that this BCM4306 wifi NIC is inside an older (2005) 
PowerBook G4 laptop, so maybe it's a hardware fault. However, wifi is 
working perfectly.

I found a similar thing reported _years_ ago for the OLTP project, with 
the following note, though I could not find the exact changeset for the 
fix yet:

   https://dev.laptop.org/ticket/8089#comment:4
   > Turned out OFW wasn't turning on the AES module.

CONFIG_CRYPTO_AES is enabled in my case. On another box with an BCM4312 
chip (and a Fedora 3.7.2-204.fc18.i686 kernel) the hwrng is working.

More details, .config & lspci here:

  http://nerdbynature.de/bits/3.8.0-rc6/BCM4306/
  http://nerdbynature.de/bits/3.8.0-rc6/BCM4312/

Any thoughts how to find out if this is a software or a hardware issue?

Thanks,
Christian.

[0] http://www.spinics.net/lists/kernel/msg1477153.html
-- 
BOFH excuse #144:

Too few computrons available.

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

* b43: /dev/hwrng isn't random
@ 2013-02-08  1:28 Christian Kujau
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Kujau @ 2013-02-08  1:28 UTC (permalink / raw)
  To: LKML

forwarding to lkml, not sure how many people read b43-dev...

Hi,

while playing around with this BCM4306 (b43) wifi NIC (and reporting some 
lockdep issues, [0]), I noticed that the chip could be used as a HWRNG and 
driver support for this has been added years ago - great, I never knew!

But when attempting to read from /dev/hwrng (b43 is loaded, interface is 
up & running), the device returns not random bytes, but:

$ head -c 1000 /dev/hwrng | od -x
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0001740 0000 0000 0000 0000
0001750

I've used a custom-built 3.8-rc6 and a stock Debian 3.2.0-4, same results. 
I should add that this BCM4306 wifi NIC is inside an older (2005) 
PowerBook G4 laptop, so maybe it's a hardware fault. However, wifi is 
working perfectly.

I found a similar thing reported _years_ ago for the OLTP project, with 
the following note, though I could not find the exact changeset for the 
fix yet:

   https://dev.laptop.org/ticket/8089#comment:4
   > Turned out OFW wasn't turning on the AES module.

CONFIG_CRYPTO_AES is enabled in my case. On another box with an BCM4312 
chip (and a Fedora 3.7.2-204.fc18.i686 kernel) the hwrng is working.

More details, .config & lspci here:

  http://nerdbynature.de/bits/3.8.0-rc6/BCM4306/
  http://nerdbynature.de/bits/3.8.0-rc6/BCM4312/

Any thoughts how to find out if this is a software or a hardware issue?

Thanks,
Christian.

[0] http://www.spinics.net/lists/kernel/msg1477153.html
-- 
BOFH excuse #144:

Too few computrons available.

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

end of thread, other threads:[~2013-02-08  1:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06  4:47 b43: /dev/hwrng isn't random Christian Kujau
2013-02-08  1:28 Christian Kujau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.