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] [day] [month] [year] [list]
Message-ID: <CAFLszTjURt-a9Y2+JsLirvK2mpP3hKZX52d0EKJaf0fiMgt5yw@mail.gmail.com>
Date: Mon, 22 Sep 2025 16:49:03 -0600
From: Simon Glass <sjg@...omium.org>
To: Tom Rini <trini@...sulko.com>
Cc: Ahmad Fatoum <a.fatoum@...gutronix.de>, 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

Hi Tom,

On Mon, 22 Sept 2025 at 07:58, Tom Rini <trini@...sulko.com> wrote:
>
> 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.

OK I will have a try.

> >
> > 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:

Yes, I sent a v2 with that. But I'll send a v3 with the cpio idea.

>
> 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

Regards,
Simon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ