• Ard Biesheuvel's avatar
    arm64: efi: Enable BTI codegen and add PE/COFF annotation · 8358098b
    Ard Biesheuvel authored
    UEFI heavily relies on so-called protocols, which are essentially
    tables populated with pointers to executable code, and these are invoked
    indirectly using BR or BLR instructions.
    
    This makes the EFI execution context vulnerable to attacks on forward
    edge control flow, and so it would help if we could enable hardware
    enforcement (BTI) on CPUs that implement it.
    
    So let's no longer disable BTI codegen for the EFI stub, and set the
    newly introduced PE/COFF header flag when the kernel is built with BTI
    landing pads.
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    Reviewed-by: default avatarMark Brown <broonie@kernel.org>
    8358098b
efi-header.S 5.5 KB