On Fri, 8 Nov 2019 at 12:10, Richard Henderson <richard.henderson@xxxxxxxxxx> wrote: > > On 11/6/19 10:30 PM, Ard Biesheuvel wrote: > > On Wed, 6 Nov 2019 at 15:20, Richard Henderson > > <richard.henderson@xxxxxxxxxx> wrote: > >> +static inline bool has_random(void) > >> +{ > >> + /* > >> + * We "have" RNG if either > >> + * (1) every cpu in the system has RNG, or > >> + * (2) in a non-preemptable context, current cpu has RNG. > >> + * Case 1 is the expected case when RNG is deployed, but > >> + * case 2 is present as a backup in case some big/little > >> + * system only has RNG on big cpus, we can still add entropy > >> + * from the interrupt handler of the big cpus. > > > > I don't understand the reference to the interrupt handler here. > > To add_interrupt_randomness(), invoked by handle_irq_event_percpu(). > Better if I reword the above to include the function name? > This is one of the several places where arch_random_get_seed_long() is called, so if you are going to single it out like that, it does make sense to clarify that. > > It is > > worth mentioning though that this arrangement permits > > rand_initialize() to use the instructions regardless of whether they > > are implemented only by the boot CPU or by all of them. > > Yes, I'll include that. > > > r~