From: Ard Biesheuvel <ardb+git@google.com>
To: linux-efi@vger.kernel.org
Cc: pjones@redhat.com, x86@kernel.org, Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH] efi/x86: Set the PE/COFF header's NX compat flag unconditionally
Date: Tue, 16 Jan 2024 09:53:48 +0100 [thread overview]
Message-ID: <20240116085347.2193966-2-ardb+git@google.com> (raw)
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>
---
| 4 ----
1 file changed, 4 deletions(-)
--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
reply other threads:[~2024-01-16 8:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240116085347.2193966-2-ardb+git@google.com \
--to=ardb+git@google.com \
--cc=ardb@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=pjones@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox