Re: [PATCH v2] m68k: virt: use RNG seed from bootinfo block

From: Geert Uytterhoeven
Date: Wed Jul 06 2022 - 05:00:39 EST


On Sun, Jun 26, 2022 at 1:15 PM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
> Other virt VMs can pass RNG seeds via the "rng-seed" device tree
> property or via UEFI, but m68k doesn't have either. Instead it has its
> own bootinfo protocol. So this commit adds support for receiving a RNG
> seed from it, which will be used at the earliest possible time in boot,
> just like device tree.
>
> Reviewed-by: Laurent Vivier <laurent@xxxxxxxxx>
> Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>

> --- a/arch/m68k/include/uapi/asm/bootinfo-virt.h
> +++ b/arch/m68k/include/uapi/asm/bootinfo-virt.h
> @@ -13,6 +13,13 @@
> #define BI_VIRT_VIRTIO_BASE 0x8004
> #define BI_VIRT_CTRL_BASE 0x8005
>
> +/* A random seed used to initialize the RNG. Record format:
> + *
> + * - length [ 2 bytes, 16-bit big endian ]
> + * - seed data [ `length` bytes ]

", padded to preserve 2-byte alignment"

Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
i.e. will queue in the m68k for-v5.20 branch with the above fixed.
No need to resend.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds