Skip to contentSkip to conversation

efi: x86: Fix config name for setting the NX-compatibility flag in the PE header

PATCH In review Lukas Bulwahn 2 participants 2 messages Jun 1, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: x86: Fix config name for setting the NX-compatibility flag in the PE header

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")

---
Peter, please review and ack.
Ard, please pick this fix-up patch.

 arch/x86/boot/header.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/header.S +1 -1
index 0352e4589efa..f912d7770130 100644
@@ -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
Signature · 1 line
2.17.1
#1 lore raw
Quoted 9 lines · 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.

Quoted 8 lines

The issue was identified with ./scripts/checkkconfigsymbols.py.

Fixes 21b68da7bf4a ("efi: x86: Set the NX-compatibility flag in the PE header")

---
Peter, please review and ack.
Ard, please pick this fix-up patch.

Thanks, Lukas, I'll queue this up.

Quoted 19 lines
 arch/x86/boot/header.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/header.S +1 -2
index 0352e4589efa..f912d7770130 100644
@@ -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