linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/efi: select ARCH_USE_MEMREMAP_PROT
@ 2021-12-04 17:41 Arnd Bergmann
  2021-12-04 17:55 ` Ard Biesheuvel
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2021-12-04 17:41 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	Ard Biesheuvel, Tom Lendacky
  Cc: Arnd Bergmann, H. Peter Anvin, Andrew Morton, Kees Cook,
	Anshuman Khandual, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 05362527f6b5..93befe25d787 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/efi: select ARCH_USE_MEMREMAP_PROT
  2021-12-04 17:41 [PATCH] x86/efi: select ARCH_USE_MEMREMAP_PROT Arnd Bergmann
@ 2021-12-04 17:55 ` Ard Biesheuvel
  2021-12-05 15:15   ` Tom Lendacky
  0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2021-12-04 17:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	X86 ML, Tom Lendacky, Arnd Bergmann, H. Peter Anvin,
	Andrew Morton, Kees Cook, Anshuman Khandual,
	Linux Kernel Mailing List

On Sat, 4 Dec 2021 at 18:42, Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

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

> ---
>  arch/x86/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 05362527f6b5..93befe25d787 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/efi: select ARCH_USE_MEMREMAP_PROT
  2021-12-04 17:55 ` Ard Biesheuvel
@ 2021-12-05 15:15   ` Tom Lendacky
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Lendacky @ 2021-12-05 15:15 UTC (permalink / raw)
  To: Ard Biesheuvel, Arnd Bergmann
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	X86 ML, Arnd Bergmann, H. Peter Anvin, Andrew Morton, Kees Cook,
	Anshuman Khandual, Linux Kernel Mailing List



On 12/4/21 11:55 AM, Ard Biesheuvel wrote:
> On Sat, 4 Dec 2021 at 18:42, Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> 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")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Thanks for the report. I'll fold this fix into the original patch instead.

Thanks Arnd and Ard!

Tom

> 
>> ---
>>   arch/x86/Kconfig | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index 05362527f6b5..93befe25d787 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -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
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-05 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-04 17:41 [PATCH] x86/efi: select ARCH_USE_MEMREMAP_PROT Arnd Bergmann
2021-12-04 17:55 ` Ard Biesheuvel
2021-12-05 15:15   ` Tom Lendacky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).