Thread (16 messages) 16 messages, 7 authors, 2022-02-22

Re: [PATCH] ath9k: use hw_random API instead of directly dumping into random.c

From: Rui Salvaterra <hidden>
Date: 2022-02-15 22:55:36
Also in: linux-crypto, linux-wireless, lkml

Hi, Jason,

On Tue, 15 Feb 2022 at 22:44, Jason A. Donenfeld [off-list ref] wrote:
Hardware random number generators are supposed to use the hw_random
framework. This commit turns ath9k's kthread-based design into a proper
hw_random driver.

This compiles, but I have no hardware or other ability to determine
whether it works. I'll leave further development up to the ath9k
and hw_random maintainers.

Cc: Toke Høiland-Jørgensen <redacted>
Cc: Kalle Valo <kvalo@kernel.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
[patch snipped]

On my laptop, with a…

02:00.0 Network controller: Qualcomm Atheros AR9462 Wireless Network
Adapter (rev 01)

… I have the following…

rui@arrandale:~$ cat /sys/devices/virtual/misc/hw_random/rng_available
ath9k
rui@arrandale:~$ cat /sys/devices/virtual/misc/hw_random/rng_current
ath9k
rui@arrandale:~$

… and sure enough, /dev/hwrng is created and outputs a stream of
random data, as expected. I haven't done any serious randomness
quality testing, but it should be the same as the one produced by the
original code. I consider this patch thus

Tested-by: Rui Salvaterra <redacted>

Thanks,
Rui
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help