lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Feb 2022 19:13:39 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     "Jason A. Donenfeld" <Jason@...c4.com>, miaoqing@...eaurora.org,
        rsalvaterra@...il.com,
        Toke Høiland-Jørgensen <toke@...e.dk>,
        "Sepehrdad, Pouyan" <pouyans@....qualcomm.com>,
        ath9k-devel <ath9k-devel@....qualcomm.com>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        Kalle Valo <kvalo@...nel.org>,
        Dominik Brodowski <linux@...inikbrodowski.net>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        LKML <linux-kernel@...r.kernel.org>,
        Netdev <netdev@...r.kernel.org>
Cc:     Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCH v2] ath9k: use hw_random API instead of directly dumping
 into random.c



On 2/15/2022 4:02 PM, Jason A. Donenfeld 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 <toke@...hat.com>
> Cc: Kalle Valo <kvalo@...nel.org>
> Cc: Dominik Brodowski <linux@...inikbrodowski.net>
> Cc: Herbert Xu <herbert@...dor.apana.org.au>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> ---

[snip]

>   	if (!AR_SREV_9300_20_OR_LATER(ah))
>   		return;
>   
> -	sc->rng_task = kthread_run(ath9k_rng_kthread, sc, "ath9k-hwrng");
> -	if (IS_ERR(sc->rng_task))
> -		sc->rng_task = NULL;
> +	sc->rng_ops.name = "ath9k";

You will have to give this instance an unique name because there can be 
multiple ath9k adapters registered in a given system (like Wi-Fi 
routers), and one of the first thing hwrng_register() does is ensure 
that there is not an existing rng with the same name.

Maybe using a combination of ath9k + dev_name() ought to be unique enough?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ