diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-01 10:32:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-01 10:32:06 -0700 |
commit | a82c58cf1a5560988d8b9b8abcd982e90a5fdaa4 (patch) | |
tree | c54d62185a143aa8a19bcf39467ff202728c838a /arch/m68k/virt/config.c | |
parent | 60ee49fac817754a465a16b837347d1e9b7b090e (diff) | |
parent | b508128bb0d1e243beb56cca5d819bcbb5c269b1 (diff) |
Merge tag 'm68k-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven:
- Use RNG seed from bootinfo block on virt platform
- defconfig updates
- Minor fixes and improvements
* tag 'm68k-for-v5.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: defconfig: Update defconfigs for v5.19-rc1
m68k: Add common forward declaration for show_registers()
m68k: mac: Remove forward declaration for mac_nmi_handler()
m68k: virt: Fix missing platform_device_unregister() on error in virt_platform_init()
m68k: virt: Use RNG seed from bootinfo block
m68k: bitops: Change __fls to return and accept unsigned long
m68k: Kconfig.machine: Add endif comment
m68k: Kconfig.debug: Replace single quotes
m68k: Kconfig.cpu: Fix indentation and add endif comments
m68k: q40: Align '*' in comments
m68k: sun3: Use __func__ to get function's name in an output message
m68k: mac: Fix typos in comments
m68k: virt: Kconfig minor fixes
Diffstat (limited to 'arch/m68k/virt/config.c')
-rw-r--r-- | arch/m68k/virt/config.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/m68k/virt/config.c b/arch/m68k/virt/config.c index 632ba200ad42..4ab22946ff68 100644 --- a/arch/m68k/virt/config.c +++ b/arch/m68k/virt/config.c @@ -2,6 +2,7 @@ #include <linux/reboot.h> #include <linux/serial_core.h> +#include <linux/random.h> #include <clocksource/timer-goldfish.h> #include <asm/bootinfo.h> @@ -92,6 +93,16 @@ int __init virt_parse_bootinfo(const struct bi_record *record) data += 4; virt_bi_data.virtio.irq = be32_to_cpup(data); break; + case BI_VIRT_RNG_SEED: { + u16 len = be16_to_cpup(data); + add_bootloader_randomness(data + 2, len); + /* + * Zero the data to preserve forward secrecy, and zero the + * length to prevent kexec from using it. + */ + memzero_explicit((void *)data, len + 2); + break; + } default: unknown = 1; break; |