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]
Message-ID: <05dc2709-aeeb-bdfd-7170-e7e686947208@csgroup.eu>
Date:   Sat, 11 Jun 2022 09:23:06 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
CC:     "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] powerpc/rng: wire up during setup_arch



Le 11/06/2022 à 11:20, Jason A. Donenfeld a écrit :
> Hi Christophe,
> 
> On Sat, Jun 11, 2022 at 09:16:24AM +0000, Christophe Leroy wrote:
>> Le 11/06/2022 à 10:11, Jason A. Donenfeld a écrit :
>>> The platform's RNG must be available before random_init() in order to be
>>> useful for initial seeding, which in turn means that it needs to be
>>> called from setup_arch(), rather than from an init call. Fortunately,
>>> each platform already has a setup_arch function pointer, which means
>>> it's easy to wire this up for each of the three platforms that have an
>>> RNG. This commit also removes some noisy log messages that don't add
>>> much.
>>
>> Can't we use one of the machine initcalls for that ?
>> Like machine_early_initcall() or machine_arch_initcall() ?
> 
> No, unfortunately. I tried this, and it's still too late. This must be
> done in setup_arch().

Ok

> 
>> Today it is using  machine_subsys_initcall() and you didn't remove it.
>> It means rng_init() will be called twice. Is that ok ?
> 
> I did remove the calls to machine_subsys_initcall(). I just double
> checked:
> 
> zx2c4@...nkpad ~/Projects/random-linux/arch/powerpc $ rg machine_subsys_initcall platforms/*/rng.c
> zx2c4@...nkpad ~/Projects/random-linux/arch/powerpc $

Oops, I overlooked it, sorry.

Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ