]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efi/zboot: Limit compression options to GZIP and ZSTD
authorArd Biesheuvel <ardb@kernel.org>
Fri, 6 Dec 2024 10:41:40 +0000 (11:41 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 6 Dec 2024 15:59:56 +0000 (16:59 +0100)
commit0b2c29fb68f8bf3e87a9d88404aa6fdd486223e5
treef599c2b113be2d37f7b16c647042c3e7e4abd553
parent40384c840ea1944d7c5a392e8975ed088ecf0b37
efi/zboot: Limit compression options to GZIP and ZSTD

For historical reasons, the legacy decompressor code on various
architectures supports 7 different compression types for the compressed
kernel image.

EFI zboot is not a compression library museum, and so the options can be
limited to what is likely to be useful in practice:

- GZIP is tried and tested, and is still one of the fastest at
  decompression time, although the compression ratio is not very high;
  moreover, Fedora is already shipping EFI zboot kernels for arm64 that
  use GZIP, and QEMU implements direct support for it when booting a
  kernel without firmware loaded;

- ZSTD has a very high compression ratio (although not the highest), and
  is almost as fast as GZIP at decompression time.

Reducing the number of options makes it less of a hassle for other
consumers of the EFI zboot format (such as QEMU today, and kexec in the
future) to support it transparently without having to carry 7 different
decompression libraries.

Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/Kconfig
drivers/firmware/efi/libstub/Makefile.zboot