[PATCH 2/4] bootm: use CONFIG_SYS_BOOTM_LEN for IH_TYPE_KERNEL_NOLOAD decompression buffer

Nora Schiffer nora.schiffer at ew.tq-group.com
Thu Jun 18 10:30:51 CEST 2026


On Wed, 2026-06-10 at 13:48 -0600, Tom Rini wrote:
> On Wed, Jun 10, 2026 at 11:01:23AM +0200, Nora Schiffer wrote:
> 
> > CONFIG_SYS_BOOTM_LEN is passed to image_decomp(), so the same should be
> > used for the buffer allocation. Deriving a buffer size from the
> > compressed size if not possible, as the compression ratio may be
> > arbitrarily high for data with many repititions (for example ranges of
> > 0x00 or 0xff).
> > 
> > Fixes: 69544c4fd8b1 ("bootm: Support kernel_noload with compression")
> > Signed-off-by: Nora Schiffer <nora.schiffer at ew.tq-group.com>
> 
> Reviewed-by: Tom Rini <trini at konsulko.com>


Hi Tom,

I saw you applied a different fix for the same issue to master. I think using
CONFIG_SYS_BOOTM_LEN is a better solution than trying to derive the buffer size
from the compressed size at all - isn't that pretty much what
CONFIG_SYS_BOOTM_LEN is for?

Let me know how you want to proceed with this. If you want to keep the already
applied fix, I'll rebase the rest of my series.

Best,
Nora


> 

-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/


More information about the U-Boot mailing list