On Wed, 08 Jul 2026 10:34:47 +0000, Aristo Chen wrote:
> Link to v1:
> https://lore.kernel.org/u-boot/[email protected]/
>
> Changes from v1 (all from Simon's review of patch 1):
>
> - Move the shared error label to the end of the function so no goto
> jumps into an if-body. Both bound checks now goto too_big and the
> printf/return sits after the final return 0.
> - Rewrite the comment on the early len > max_size check. The real
> reason it exists is to keep get_aligned_image_size() from running
> its int arithmetic on a hostile value; the block-aligned size
> check further down is the mathematically binding one because size
> is len rounded up.
> - Include the data-size value in the diagnostic printf so a real
> failure is triageable from a board log.
> - Note in the fix commit message that CONFIG_SYS_BOOTM_LEN is a
> conservative ceiling for the firmware/loadables/FDT/FPGA callers
> rather than the exact capacity at the destination. The overlay
> caller remains the one that is actually tight against its buffer.
>
> [...]
Applied to u-boot/main, thanks!
[1/2] spl: fit: bound the external data size before reading it
commit: 8f71d7170f5c3abadee45683e35ae6d925b6d417
[2/2] test: spl: check load_simple_fit() rejects an oversized data-size
commit: 85667122fb5fa215315a633335efc27ecd195b21
--
Tom