Skip to contentSkip to conversation

x86/efi: select ARCH_USE_MEMREMAP_PROT

PATCH In review Arnd Bergmann 3 participants 3 messages Dec 4, 2021 – Dec 5, 2021 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/efi: select ARCH_USE_MEMREMAP_PROT

From: Arnd Bergmann <[email protected]>

The patch to map the EFI memmap as encrypted introduces a link failure in configurations without encryption support:

x86_64-linux-ld: arch/x86/platform/efi/quirks.o: in function `efi_arch_mem_reserve':
quirks.c:(.init.text+0x127): undefined reference to `early_memremap_prot'

Select the necessary symbol here as well to fix the build.

Fixes 8f1dd76c9b55 ("x86/sme: Explicitly map new EFI memmap table as encrypted")
---
 arch/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/x86/Kconfig +1 -0
index 05362527f6b5..93befe25d787 100644
@@ -1934,6 +1934,7 @@ config EFI
 	depends on ACPI
 	select UCS2_STRING
 	select EFI_RUNTIME_WRAPPERS
+	select ARCH_USE_MEMREMAP_PROT
 	help
 	  This enables the kernel to use EFI runtime services that are
 	  available (such as the EFI variable services).
Signature · 1 line
2.29.2
#1 lore raw
Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The patch to map the EFI memmap as encrypted introduces a link failure in configurations without encryption support:

Quoted 7 lines

x86_64-linux-ld: arch/x86/platform/efi/quirks.o: in function `efi_arch_mem_reserve':
quirks.c:(.init.text+0x127): undefined reference to `early_memremap_prot'

Select the necessary symbol here as well to fix the build.

Fixes 8f1dd76c9b55 ("x86/sme: Explicitly map new EFI memmap table as encrypted")

Thanks for the report. I'll fold this fix into the original patch instead.

Quoted 19 lines
---
 arch/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/x86/Kconfig +1 -1
index 05362527f6b5..93befe25d787 100644
@@ -1934,6 +1934,7 @@ config EFI
        depends on ACPI
        select UCS2_STRING
        select EFI_RUNTIME_WRAPPERS
+       select ARCH_USE_MEMREMAP_PROT
        help
          This enables the kernel to use EFI runtime services that are
          available (such as the EFI variable services).
--

2.29.2

#2 lore raw
Quoted 10 lines · Ard Biesheuvel
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The patch to map the EFI memmap as encrypted introduces a link failure in configurations without encryption support:

x86_64-linux-ld: arch/x86/platform/efi/quirks.o: in function `efi_arch_mem_reserve':
quirks.c:(.init.text+0x127): undefined reference to `early_memremap_prot'

Quoted 6 lines
Quoted 4 lines

Select the necessary symbol here as well to fix the build.

Fixes 8f1dd76c9b55 ("x86/sme: Explicitly map new EFI memmap table as encrypted")

Thanks for the report. I'll fold this fix into the original patch instead.

Thanks Arnd and Ard!

Tom

Quoted 20 lines
Quoted 20 lines
---
  arch/x86/Kconfig | 1 +
  1 file changed, 1 insertion(+)
arch/x86/Kconfig +1 -1
index 05362527f6b5..93befe25d787 100644
@@ -1934,6 +1934,7 @@ config EFI
         depends on ACPI
         select UCS2_STRING
         select EFI_RUNTIME_WRAPPERS
+       select ARCH_USE_MEMREMAP_PROT
         help
           This enables the kernel to use EFI runtime services that are
           available (such as the EFI variable services).
--

2.29.2