[PATCH] ARM: implement support for SMCCC TRNG entropy source

Linus Walleij linus.walleij at linaro.org
Tue Oct 6 08:55:43 EDT 2020


On Tue, Oct 6, 2020 at 12:40 PM Ard Biesheuvel <ardb at kernel.org> wrote:

> Implement arch_get_random_seed_*() for ARM based on the firmware
> or hypervisor provided entropy source described in ARM DEN0098.
>
> This will make the kernel's random number generator consume entropy
> provided by this interface, at early boot, and periodically at
> runtime when reseeding.
>
> Cc: Andre Przywara <andre.przywara at arm.com>
> Cc: Linus Walleij <linus.walleij at linaro.org>
> Cc: Russell King <linux at armlinux.org.uk>
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>

This is a good place to start for sure.
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>

Ideally (if I can dream) I would like to see an interface similar to
"earlycon", where some drivers have special callbacks that can
be used really early to get some debug prints, something like
that but named "earlyrandom", so that any drivers under
drivers/char/hw_random.c
could optionally implement these early callbacks and provide
random seed right out of some register reads or so before the
kernel driver core is up. I do not know how
realistic that is, but for e.g. the nomadik-rng.c it is a simple
register read from a physical address which should be simple
to achieve.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list