[PATCH] ath9k: backport hw_random API support

Rui Salvaterra rsalvaterra at gmail.com
Wed Mar 23 06:25:18 PDT 2022

Hi again,

On Wed, 2 Mar 2022 at 13:31, Rui Salvaterra <rsalvaterra at gmail.com> wrote:
> Backport Jason's patch [1] implementing proper hw_random API support for the
> ath9k hwrng. The original code invoked add_hwgenerator_randomness to directly
> feed ADC entropy into the system pool. Since add_hwgenerator_randomness blocks
> until the system is low on entropy, if there is another hw_random API-based
> hwrng selected in the system, both of them will race to feed the entropy pool
> on wake-up. This unpredictability of the entropy source is a potential security
> risk. By turning supported ath9k devices into proper hwrngs, we allow users to
> choose one, if any, as they see fit.
> [1] https://lore.kernel.org/all/20220216113323.53332-1-Jason@zx2c4.com/
> Acked-by: Petr Štetiar <ynezz at true.cz>
> Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>

[patch snipped]

Rats. I just noticed a build failure with the default configuration
because the kmod-ath9k package is missing the kmod-random-core
dependency when it's built with CONFIG_ATH9K_HWRNG. I hadn't noticed
it before because I compile my kernels with as many built-in modules
as possible. Will send a v2 shortly.


More information about the openwrt-devel mailing list