]> www.infradead.org Git - nvme.git/commit
efi/libstub: Avoid legacy decompressor zlib/zstd wrappers
authorArd Biesheuvel <ardb@kernel.org>
Wed, 20 Nov 2024 19:36:03 +0000 (20:36 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 14 Mar 2025 11:36:11 +0000 (12:36 +0100)
commit0dc1754e16b4c14ae42f6cf59f319331d885f0f6
tree69dbd69e91610e9b1d551600c1ffd0b76dbfc775
parent74d613e046e418ed512b265aa2ef8a27a761fb4d
efi/libstub: Avoid legacy decompressor zlib/zstd wrappers

Remove EFI zboot's dependency on the decompression wrappers used by the
legacy decompressor boot code, which can only process the input in one
go, and this will not work for upcoming support for embedded ELF images.
They also do some odd things like providing a barebones malloc()
implementation, which is not needed in a hosted environment such as the
EFI boot services.

So instead, implement GZIP deflate and ZSTD decompression in terms of
the underlying libraries. Support for other compression algoritms has
already been dropped.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/Makefile
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/zboot-decompress-gzip.c [new file with mode: 0644]
drivers/firmware/efi/libstub/zboot-decompress-zstd.c [new file with mode: 0644]
drivers/firmware/efi/libstub/zboot.c
drivers/firmware/efi/libstub/zboot.lds