Skip to content
Commit fa005a5c authored by Mihai Carabas's avatar Mihai Carabas Committed by Greg Kroah-Hartman
Browse files

efi/libstub: arm64: Fix image check alignment at entry



[ Upstream commit e9b7c3a4 ]

The kernel is aligned at SEGMENT_SIZE and this is the size populated in the PE
headers:

arch/arm64/kernel/efi-header.S: .long   SEGMENT_ALIGN // SectionAlignment

EFI_KIMG_ALIGN is defined as: (SEGMENT_ALIGN > THREAD_ALIGN ? SEGMENT_ALIGN :
THREAD_ALIGN)

So it depends on THREAD_ALIGN. On newer builds this message started to appear
even though the loader is taking into account the PE header (which is stating
SEGMENT_ALIGN).

Fixes: c32ac11d ("efi/libstub: arm64: Double check image alignment at entry")
Signed-off-by: default avatarMihai Carabas <mihai.carabas@oracle.com>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 42ff00c2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment