From: Ard Biesheuvel <ardb@kernel.org>
To: linux-arm-kernel@lists.infradead.org
Cc: mark.rutland@arm.com, catalin.marinas@arm.com, will@kernel.org,
james.morse@arm.com, Ard Biesheuvel <ardb@kernel.org>
Subject: [PATCH 1/4] arm64: efi: increase EFI PE/COFF header padding to 64 KB
Date: Tue, 27 Oct 2020 08:32:06 +0100 [thread overview]
Message-ID: <20201027073209.2897-2-ardb@kernel.org> (raw)
In-Reply-To: <20201027073209.2897-1-ardb@kernel.org>
Commit 76085aff29f5 ("efi/libstub/arm64: align PE/COFF sections to segment
alignment") increased the PE/COFF section alignment to match the minimum
segment alignment of the kernel image, which ensures that the kernel does
not need to be moved around in memory by the EFI stub if it was built as
relocatable.
However, the first PE/COFF section starts at _stext, which is only 4 KB
aligned, and so the section layout is inconsistent. Existing EFI loaders
seem to care little about this, but it is better to clean this up.
So let's pad the header to 64 KB to match the PE/COFF section alignment.
Fixes: 76085aff29f5 ("efi/libstub/arm64: align PE/COFF sections to ...")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/arch/arm64/kernel/efi-header.S b/arch/arm64/kernel/efi-header.S
index df67c0f2a077..a71844fb923e 100644
--- a/arch/arm64/kernel/efi-header.S
+++ b/arch/arm64/kernel/efi-header.S
@@ -147,6 +147,6 @@ efi_debug_entry:
* correctly at this alignment, we must ensure that .text is
* placed at a 4k boundary in the Image to begin with.
*/
- .align 12
+ .balign SEGMENT_ALIGN
efi_header_end:
.endm
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-10-27 7:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 7:32 [PATCH 0/4] arm64: head: pad Image header to 64 KB and unmap it Ard Biesheuvel
2020-10-27 7:32 ` Ard Biesheuvel [this message]
2020-10-27 7:32 ` [PATCH 2/4] arm64: omit [_text, _stext) from permanent kernel mapping Ard Biesheuvel
2020-10-28 14:10 ` Will Deacon
2020-10-27 7:32 ` [PATCH 3/4] arm64/head: avoid symbol names pointing into first 64 KB of kernel image Ard Biesheuvel
2020-10-28 14:12 ` Will Deacon
2020-10-27 7:32 ` [PATCH 4/4] arm64: head: tidy up the Image header definition Ard Biesheuvel
2020-10-28 14:17 ` Will Deacon
2020-10-28 17:56 ` Robin Murphy
2020-10-29 7:30 ` Ard Biesheuvel
2020-10-29 13:06 ` Robin Murphy
2020-11-03 7:13 ` Ard Biesheuvel
2020-11-04 11:29 ` Robin Murphy
2020-10-28 15:12 ` [PATCH 0/4] arm64: head: pad Image header to 64 KB and unmap it Will Deacon
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=20201027073209.2897-2-ardb@kernel.org \
--to=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=will@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;
as well as URLs for NNTP newsgroup(s).