Re: [PATCH 2/3] random: rng-seed source is utf-8

From
Theodore Y. Ts'o <tytso@mit.edu>
Date
2020-02-18 17:17:00
Also in
lkml
Reply to
Mark Salyzyn, 2020-02-18
On Tue, Feb 18, 2020 at 08:01:51AM -0800, Mark Salyzyn wrote:
I am additionally concerned about add_bootloader_randomness() because it is
possible for it to sleep because of add_hwgenerator_randomness() as once it
hits the entropy threshold. As-is it can not be used inside start_kernel()
because the sleep would result in a kernel panic, and I suspect its use
inside early_init_dt_scan_chosen() for the commit "fdt: add support for
rng-seed" might also be problematic since it is effectively called
underneath start_kernel() is it not?

If add_bootloader_randomness was rewritten to call add_device_randomness()
always, and when trusted also called the functionality of the new
credit_trusted_entropy_bits (no longer needing to be exported if so), then
the function could be used in both start_kernel() and
early_init_dt_scan_chosen().
That's a good point, and it's a bug in add_bootloader_randomness().
That should be easily fixed by simply having it call mix_pool_bytes()
and credit_entropy_bits() directly.  I'll create a patch...

    			  	     	  	   - Ted
Thread (17 messages) 17 messages, 5 authors, last reply 2020-02-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help