Commit 182ddd16 authored by Juergen Gross's avatar Juergen Gross Committed by Ingo Molnar

x86/boot: Clear RSDP address in boot_params for broken loaders

Gunnar Krueger reported a systemd-boot failure and bisected it down to:

  e6e094e0 ("x86/acpi, x86/boot: Take RSDP address from boot params if available")

In case a broken boot loader doesn't clear its 'struct boot_params', clear
rsdp_addr in sanitize_boot_params().
Reported-by: default avatarGunnar Krueger <taijian@posteo.de>
Tested-by: default avatarGunnar Krueger <taijian@posteo.de>
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bp@alien8.de
Cc: sstabellini@kernel.org
Fixes: e6e094e0 ("x86/acpi, x86/boot: Take RSDP address from boot params if available")
Link: http://lkml.kernel.org/r/20181203103811.17056-1-jgross@suse.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 25956467
...@@ -36,6 +36,7 @@ static void sanitize_boot_params(struct boot_params *boot_params) ...@@ -36,6 +36,7 @@ static void sanitize_boot_params(struct boot_params *boot_params)
*/ */
if (boot_params->sentinel) { if (boot_params->sentinel) {
/* fields in boot_params are left uninitialized, clear them */ /* fields in boot_params are left uninitialized, clear them */
boot_params->acpi_rsdp_addr = 0;
memset(&boot_params->ext_ramdisk_image, 0, memset(&boot_params->ext_ramdisk_image, 0,
(char *)&boot_params->efi_info - (char *)&boot_params->efi_info -
(char *)&boot_params->ext_ramdisk_image); (char *)&boot_params->ext_ramdisk_image);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment