[PATCH 4/5] efi/arm64: Expose struct efi_image_info via the image header
Jason Gunthorpe
jgg at nvidia.com
Fri Nov 6 06:34:18 PST 2026
On Fri, Nov 06, 2026 at 03:19:41PM +0100, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb at kernel.org>
>
> The zboot compressed kernel and the uncompressed Image both contain a
> copy of the EFI stub, and both are tightly coupled to the kernel image.
>
> However, the zboot stub is not linked into vmlinux like the ordinary EFI
> stub is, and so it does not have direct access to its symbols. This is
> needed today for things like image size and code size, but there are
> more cases coming (DRTM) where both stubs need to have a consistent view
> of these things.
>
> So add a struct efi_image_info that is built into vmlinux and exposed
> via the image header, so that zboot can access it easily.
I tried hard to avoid doing this because I didn't want to make the
struct layout ABI. I really see only negatives to that.
Putting it here and documenting it in the rst is going to encourage
other bootloaders to look inside it and try to read the contents. :(
The linker trick to inject the offset into zboot seemed better because
it completely prevents it from being ABI as nothing but the EFI stubs
can ever locate it.
Also, I wanted it to eventually be cross arch and I don't know if
other arches have any spare space like this.
Jason
More information about the linux-arm-kernel
mailing list