• Mihai Carabas's avatar
    efi/libstub: arm64: Fix image check alignment at entry · e9b7c3a4
    Mihai Carabas authored
    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>
    e9b7c3a4
arm64-stub.c 4.79 KB