* [PATCH] efi: x86: Fix config name for setting the NX-compatibility flag in the PE header
@ 2022-06-01 11:50 Lukas Bulwahn
2022-06-01 12:02 ` Ard Biesheuvel
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Bulwahn @ 2022-06-01 11:50 UTC (permalink / raw)
To: Peter Jones, Ard Biesheuvel
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H . Peter Anvin, kernel-janitors, linux-kernel, Lukas Bulwahn
Commit 21b68da7bf4a ("efi: x86: Set the NX-compatibility flag in the PE
header") intends to set the compatibility flag, i.e.,
IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, but this ifdef is actually dead as the
CONFIG_DXE_MEM_ATTRIBUTES does not exist.
The config is actually called EFI_DXE_MEM_ATTRIBUTES. Adjust the ifdef to
use the intended config name.
The issue was identified with ./scripts/checkkconfigsymbols.py.
Fixes: 21b68da7bf4a ("efi: x86: Set the NX-compatibility flag in the PE header")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
Peter, please review and ack.
Ard, please pick this fix-up patch.
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 0352e4589efa..f912d7770130 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -163,7 +163,7 @@ extra_header_fields:
.long 0x200 # SizeOfHeaders
.long 0 # CheckSum
.word IMAGE_SUBSYSTEM_EFI_APPLICATION # Subsystem (EFI application)
-#ifdef CONFIG_DXE_MEM_ATTRIBUTES
+#ifdef CONFIG_EFI_DXE_MEM_ATTRIBUTES
.word IMAGE_DLL_CHARACTERISTICS_NX_COMPAT # DllCharacteristics
#else
.word 0 # DllCharacteristics
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] efi: x86: Fix config name for setting the NX-compatibility flag in the PE header
2022-06-01 11:50 [PATCH] efi: x86: Fix config name for setting the NX-compatibility flag in the PE header Lukas Bulwahn
@ 2022-06-01 12:02 ` Ard Biesheuvel
0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2022-06-01 12:02 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Peter Jones, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, X86 ML, H . Peter Anvin, kernel-janitors,
Linux Kernel Mailing List
On Wed, 1 Jun 2022 at 13:51, Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:
>
> Commit 21b68da7bf4a ("efi: x86: Set the NX-compatibility flag in the PE
> header") intends to set the compatibility flag, i.e.,
> IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, but this ifdef is actually dead as the
> CONFIG_DXE_MEM_ATTRIBUTES does not exist.
>
> The config is actually called EFI_DXE_MEM_ATTRIBUTES. Adjust the ifdef to
> use the intended config name.
>
> The issue was identified with ./scripts/checkkconfigsymbols.py.
>
> Fixes: 21b68da7bf4a ("efi: x86: Set the NX-compatibility flag in the PE header")
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> ---
> Peter, please review and ack.
> Ard, please pick this fix-up patch.
>
Thanks, Lukas, I'll queue this up.
> arch/x86/boot/header.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
> index 0352e4589efa..f912d7770130 100644
> --- a/arch/x86/boot/header.S
> +++ b/arch/x86/boot/header.S
> @@ -163,7 +163,7 @@ extra_header_fields:
> .long 0x200 # SizeOfHeaders
> .long 0 # CheckSum
> .word IMAGE_SUBSYSTEM_EFI_APPLICATION # Subsystem (EFI application)
> -#ifdef CONFIG_DXE_MEM_ATTRIBUTES
> +#ifdef CONFIG_EFI_DXE_MEM_ATTRIBUTES
> .word IMAGE_DLL_CHARACTERISTICS_NX_COMPAT # DllCharacteristics
> #else
> .word 0 # DllCharacteristics
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-01 12:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 11:50 [PATCH] efi: x86: Fix config name for setting the NX-compatibility flag in the PE header Lukas Bulwahn
2022-06-01 12:02 ` Ard Biesheuvel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.