Skip to content

Commit 891f889

Browse files
ardbiesheuvelbp3tk0v
authored andcommitted
efi/x86: Set the PE/COFF header's NX compat flag unconditionally
Now that the proper section and file alignment is used, and the EFI memory attributes protocol to manage executable permissions where needed is invoked, set the NX compat flag unconditionally. [ bp: Remove the "we"s. ] Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20240116085347.2193966-2-ardb+git@google.com
1 parent 11e36b0 commit 891f889

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

arch/x86/boot/header.S

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ extra_header_fields:
111111
.long salign # SizeOfHeaders
112112
.long 0 # CheckSum
113113
.word IMAGE_SUBSYSTEM_EFI_APPLICATION # Subsystem (EFI application)
114-
#ifdef CONFIG_EFI_DXE_MEM_ATTRIBUTES
115114
.word IMAGE_DLL_CHARACTERISTICS_NX_COMPAT # DllCharacteristics
116-
#else
117-
.word 0 # DllCharacteristics
118-
#endif
119115
#ifdef CONFIG_X86_32
120116
.long 0 # SizeOfStackReserve
121117
.long 0 # SizeOfStackCommit

0 commit comments

Comments
 (0)