All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] efi/x86: Set the PE/COFF header's NX compat flag unconditionally
@ 2024-01-16  8:53 Ard Biesheuvel
  2024-02-28 13:35 ` [tip: x86/boot] " tip-bot2 for Ard Biesheuvel
  0 siblings, 1 reply; 2+ messages in thread
From: Ard Biesheuvel @ 2024-01-16  8:53 UTC (permalink / raw)
  To: linux-efi; +Cc: pjones, x86, Ard Biesheuvel

From: Ard Biesheuvel <ardb@kernel.org>

Now that we use the proper section and file alignment, and invoke the
EFI memory attributes protocol to manage executable permissions where
needed, we can set the NX compat flag unconditionally.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 arch/x86/boot/header.S | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index b2771710ed98..34963501a2c5 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -112,11 +112,7 @@ extra_header_fields:
 	.long	salign				# SizeOfHeaders
 	.long	0				# CheckSum
 	.word	IMAGE_SUBSYSTEM_EFI_APPLICATION	# Subsystem (EFI application)
-#ifdef CONFIG_EFI_DXE_MEM_ATTRIBUTES
 	.word	IMAGE_DLL_CHARACTERISTICS_NX_COMPAT	# DllCharacteristics
-#else
-	.word	0				# DllCharacteristics
-#endif
 #ifdef CONFIG_X86_32
 	.long	0				# SizeOfStackReserve
 	.long	0				# SizeOfStackCommit
-- 
2.43.0.275.g3460e3d667-goog


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

* [tip: x86/boot] efi/x86: Set the PE/COFF header's NX compat flag unconditionally
  2024-01-16  8:53 [PATCH] efi/x86: Set the PE/COFF header's NX compat flag unconditionally Ard Biesheuvel
@ 2024-02-28 13:35 ` tip-bot2 for Ard Biesheuvel
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Ard Biesheuvel @ 2024-02-28 13:35 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Ard Biesheuvel, Borislav Petkov (AMD), x86, linux-kernel

The following commit has been merged into the x86/boot branch of tip:

Commit-ID:     891f8890a4a3663da7056542757022870b499bc1
Gitweb:        https://git.kernel.org/tip/891f8890a4a3663da7056542757022870b499bc1
Author:        Ard Biesheuvel <ardb@kernel.org>
AuthorDate:    Tue, 16 Jan 2024 09:53:48 +01:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Wed, 28 Feb 2024 14:23:55 +01:00

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
---
 arch/x86/boot/header.S | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index a1bbedd..b5c79f4 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -111,11 +111,7 @@ extra_header_fields:
 	.long	salign				# SizeOfHeaders
 	.long	0				# CheckSum
 	.word	IMAGE_SUBSYSTEM_EFI_APPLICATION	# Subsystem (EFI application)
-#ifdef CONFIG_EFI_DXE_MEM_ATTRIBUTES
 	.word	IMAGE_DLL_CHARACTERISTICS_NX_COMPAT	# DllCharacteristics
-#else
-	.word	0				# DllCharacteristics
-#endif
 #ifdef CONFIG_X86_32
 	.long	0				# SizeOfStackReserve
 	.long	0				# SizeOfStackCommit

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

end of thread, other threads:[~2024-02-28 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16  8:53 [PATCH] efi/x86: Set the PE/COFF header's NX compat flag unconditionally Ard Biesheuvel
2024-02-28 13:35 ` [tip: x86/boot] " tip-bot2 for 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.