lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 12 Apr 2019 10:49:56 +0200
From:   Borislav Petkov <>
To:     Junichi Nomura <>
Cc:     Dave Young <>,
        Chao Fan <>,
        Baoquan He <>, Kairui Song <>,
        "" <>,
        "" <>,
        "" <>
Subject: Re: [PATCH v4] x86/boot: Use efi_setup_data for searching RSDP on
 kexec-ed kernel

On Fri, Apr 12, 2019 at 02:54:17AM +0000, Junichi Nomura wrote:
> Without #ifdef CONFIG_X86_64, I got compiler warnings on 32bit build
> about casting u64 to pointer.

Yah, stupid ifdeffery.

> We need #ifdef CONFIG_EFI to avoid build failure about undefined
> __efi_get_rsdp_addr().

diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot/compressed/acpi.c
index c3020e2d8f67..4b1d4a0a4269 100644
--- a/arch/x86/boot/compressed/acpi.c
+++ b/arch/x86/boot/compressed/acpi.c
@@ -46,7 +46,6 @@ static acpi_physical_address get_acpi_rsdp(void)
 	return addr;
-#ifdef CONFIG_EFI
  * Search EFI system tables for RSDP.  If both ACPI_20_TABLE_GUID and
  * ACPI_TABLE_GUID are found, take the former, which has more features.
@@ -56,6 +55,8 @@ __efi_get_rsdp_addr(unsigned long config_tables, unsigned int nr_tables,
 		    bool efi_64)
 	acpi_physical_address rsdp_addr = 0;
+#ifdef CONFIG_EFI
 	int i;
 	/* Get EFI tables from systab. */
@@ -85,10 +86,9 @@ __efi_get_rsdp_addr(unsigned long config_tables, unsigned int nr_tables,
 		else if (!(efi_guidcmp(guid, ACPI_20_TABLE_GUID)))
 			return table;
 	return rsdp_addr;
 /* EFI/kexec support is 64-bit only. */
 #ifdef CONFIG_X86_64

> I think that should be the other way around:

No, it shouldn't.

kexec_get_rsdp_addr() must do:

	if (!kexec_kernel)
		return 0:

        esd = (struct efi_setup_data *)get_kexec_setup_data_addr();
        if (!esd)
                return EFI_SETUP_DATA_INVALID;


Now I need to go figure out whether there's a reliable way to know in
the kexec kernel that it *is* a kexec kernel.


Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists