[PATCH 1/2] test: compression: check with trailing garbage in input

Simon Glass sjg at chromium.org
Thu Dec 29 23:38:55 CET 2022


On Wed, 28 Dec 2022 at 16:54, Brandon Maier <brandon.maier at collins.com> wrote:
>
> The Linux kernel appends 4 bytes to the end of compressed kernel Images
> containing the uncompressed image size. They are used to make
> self-decompressing Images easier. However for archs that don't support
> self-decompression, like ARM64, U-Boot must be able to decompress the
> image with the garbage data.
>
> The existing decompressors already support this. This unit test was
> added while working on zstd support as upstream zstd will error if there
> is garbage data in the input buffer, and special care was needed to
> support this.
>
> Signed-off-by: Brandon Maier <brandon.maier at collins.com>
> ---
>  test/compression.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list