lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250922135804.GA124814@bill-the-cat>
Date: Mon, 22 Sep 2025 07:58:04 -0600
From: Tom Rini <trini@...sulko.com>
To: Ahmad Fatoum <a.fatoum@...gutronix.de>
Cc: Simon Glass <sjg@...omium.org>, linux-arm-kernel@...ts.infradead.org,
	Chen-Yu Tsai <wenst@...omium.org>,
	J . Neuschäfer <j.ne@...teo.net>,
	Masahiro Yamada <masahiroy@...nel.org>,
	linux-kernel@...r.kernel.org,
	Pengutronix Kernel Team <kernel@...gutronix.de>
Subject: Re: [PATCH 1/2] scripts/make_fit: Support an initial ramdisk

On Mon, Sep 22, 2025 at 09:14:55AM +0200, Ahmad Fatoum wrote:
> Hello Simon,
> 
> On 19.09.25 23:09, Simon Glass wrote:
> > FIT (Flat Image Tree) allows an ramdisk to be included in each
> > configuration. Add support for this to the script.
> > 
> > This feature is not available via 'make image.fit' since the ramdisk
> > likely needs to be built separately anyway, e.g. using modules from
> > the kernel build.
> 
> AFAIK the kernel supports multiple concatenated separately compressed
> initramfs just fine, so it may still be useful to add a target which
> builds a cpio with all modules inside and the rest can be then
> concatenated.
> 
> What do you think?
> 
> > +        fsw.property_string('compression', args.compress)
> 
> compression should be none as the kernel would take of decompression.
> 
> Both U-Boot and barebox should warn about ramdisk compression property
> that is != "none".

Agreed. In U-Boot we've been handling this correctly since:

commit bddd985734653c366c8da073650930fb2e9b5003
Author: Julius Werner <jwerner@...omium.org>
Date:   Fri Aug 2 15:52:28 2019 -0700

    fit: Do not automatically decompress ramdisk images
    
    The Linux ramdisk should always be decompressed by the kernel itself,
    not by U-Boot. Therefore, the 'compression' node in the FIT image should
    always be set to "none" for ramdisk images, since the only point of
    using that node is if you want U-Boot to do the decompression itself.
    
    Yet some systems populate the node to the compression algorithm used by
    the kernel instead. This used to be ignored, but now that we support
    decompression of all image types it becomes a problem. Since ramdisks
    should never be decompressed by U-Boot anyway, this patch adds a special
    exception for them to avoid these issues. Still, setting the
    'compression' node like that is wrong in the first place, so we still
    want to print out a warning so that third-party distributions doing this
    can notice and fix it.
    
    Signed-off-by: Julius Werner <jwerner@...omium.org>
    Reviewed-by: Heiko Schocher <hs@...x.de>
    Tested-by: Heiko Schocher <hs@...x.de>
    Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@...il.com>

-- 
Tom

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ