]> git.ipfire.org Git - thirdparty/u-boot.git/commit
bootm: increase kernel_noload decompression headroom from 4x to 8x
authorAristo Chen <aristo.chen@canonical.com>
Fri, 5 Jun 2026 15:42:50 +0000 (15:42 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 17 Jun 2026 18:47:33 +0000 (12:47 -0600)
commitf42eac9dc8a8b8125920d8a18f7f64afedf1fbc5
tree8a22fe3934b333aacf36675633106a55dc0adf20
parent914ebe8b16b40537c3b438bc213b738151018ec6
bootm: increase kernel_noload decompression headroom from 4x to 8x

For a compressed kernel_noload image, bootm_load_os() allocates a buffer
of ALIGN(image_len * 4, SZ_1M). The 4x factor is at the edge of what
modern compressors (zstd, xz) achieve on real kernels, so a
well-compressed vendor kernel can fail to boot at runtime with no
intervening warning.

Bump the headroom to 8x. The buffer is still bounded by the compressed
image size, and the SZ_1M alignment keeps the overhead below 1 MiB on
small kernels.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
boot/bootm.c