[PATCH v2 11/11] test: boot: imagemap: caller-owned region not resized
Simon Glass
sjg at chromium.org
Fri Oct 23 04:37:37 PDT 2026
On 2026-10-21T14:08:59, Daniel Golle <daniel at makrotopia.org> wrote:
> test: boot: imagemap: caller-owned region not resized
>
> Add a unit test that locks down the fix in imagemap_map(): a larger
> request against a region recorded by imagemap_map_to() (which the
> caller owns and is not LMB-reserved) falls through to a fresh LMB
> allocation instead of resizing the caller's memory.
>
> The test reserves a caller-owned buffer inside the LMB-managed RAM,
> records a 64-byte region there via imagemap_map_to() with a guard
> pattern beyond the payload, then issues a 256-byte imagemap_map() at the
> same base. It verifies the returned pointer differs from the caller's
> buffer, the guard tail is unchanged, and the new region is LMB-reserved.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
>
> test/boot/imagemap.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 95 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the openwrt-devel
mailing list