Re: [PATCH v3] hw_random: use add_hwgenerator_randomness() for early entropy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 08, 2022 at 11:53:23AM +0100, AngeloGioacchino Del Regno wrote:
> Il 06/11/22 16:02, Jason A. Donenfeld ha scritto:
> > Rather than calling add_device_randomness(), the add_early_randomness()
> > function should use add_hwgenerator_randomness(), so that the early
> > entropy can be potentially credited, which allows for the RNG to
> > initialize earlier without having to wait for the kthread to come up.
> > 
> > This requires some minor API refactoring, by adding a `sleep_after`
> > parameter to add_hwgenerator_randomness(), so that we don't hit a
> > blocking sleep from add_early_randomness().
> > 
> > Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> > Cc: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>
> > Acked-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> > ---
> > Herbert - it might be easiest for me to take this patch if you want? Or
> > if this will interfere with what you have going on, you can take it. Let
> > me know what you feel like. -Jason
> > 
> >   drivers/char/hw_random/core.c |  8 +++++---
> >   drivers/char/random.c         | 12 ++++++------
> >   include/linux/random.h        |  2 +-
> >   3 files changed, 12 insertions(+), 10 deletions(-)
> > 
> 
> Hello,
> 
> I tried booting next-20221108 on Acer Tomato Chromebook (MediaTek MT8195) but
> this commit is producing a kernel panic.


Thanks for the report. I see exactly what the problem is, and I'll send
a v+1 right away.

Jason



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux