From: Carlo Caione <ccaione@baylibre.com>
To: Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: u-boot@lists.u-boot-project.org, Tom Rini <trini@konsulko.com>,
Simon Glass <sjg@chromium.org>,
Lukasz Majewski <lukma@nabladev.com>,
Marek Vasut <marek.vasut+usb@mailbox.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
York Sun <york.sun@nxp.com>,
Francesco Valla <francesco@valla.it>,
Anton Ivanov <anton@binarly.io>,
Aristo Chen <aristo.chen@canonical.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Marek Vasut <marex@nabladev.com>,
Michal Simek <michal.simek@amd.com>, Peng Fan <peng.fan@nxp.com>,
Daniel Golle <daniel@makrotopia.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Sam Day <me@samcday.com>, Pengpeng Hou <pengpeng@iscas.ac.cn>,
Alexey Charkov <alchark@flipper.net>,
Kevin Hilman <khilman@baylibre.com>
Subject: Re: [PATCH 3/6] spl: ram: allow loading FIT images from a supplied buffer
Date: Tue, 3 Nov 2026 17:51:10 +0100 [thread overview]
Message-ID: <auoQVAmA6CWHVMaO@macbook> (raw)
In-Reply-To: <179370057187.349126.11782363973041228093.b4-review@b4>
On Tue, Nov 03, 2026 at 11:09:31 +0100, Mattijs Korpershoek wrote:
> Hi Carlo,
>
> Thank you for the patch.
>
> > RAM FIT loading currently assumes a configured image address. Downloaded
> > images need the same loader with a caller-provided buffer and length so
> > reads cannot run beyond the received data.
> >
> > Expose a reusable RAM FIT loader with header validation, bounded reads
> > and overlap-safe copying. Keep preloaded images working when their buffer
> > size is unknown. Add tests for embedded and external FIT data.
> >
> > Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index d1f51d9197d9..f464e0bd2bce 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -1923,5 +1923,6 @@ Q: http://patchwork.ozlabs.org/project/uboot/list/
> > S: Maintained
> > T: git https://git.u-boot-project.org/u-boot/u-boot.git
> > F: configs/tools-only_defconfig
> > +F: test/image/spl_ram.c
> > F: *
> > F: */
> > diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
> > index 0c501cf02f28..ee588ef4718b 100644
> > --- a/common/spl/spl_ram.c
> > +++ b/common/spl/spl_ram.c
> > @@ -16,32 +16,39 @@
> > #include <spl.h>
> > #include <linux/libfdt.h>
> >
> > -static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector,
> > +struct spl_ram_image {
> > + const void *data;
> > + size_t size;
> > +};
> > +
> > +static ulong spl_ram_load_read(struct spl_load_info *load, ulong offset,
>
> Why changing sector -> offset? It makes the diff more difficult to read and
> as far as I understand, the callers are still passing the same argument to
> this function.
It was just for the sake of clarity. I'll dump this.
> > ulong count, void *buf)
> > {
> > - ulong addr = 0;
> > -
> > - debug("%s: sector %lx, count %lx, buf %lx\n",
> > - __func__, sector, count, (ulong)buf);
>
> Why is this dropped? It's not mentioned in the commit message.
Ooops, I'll restore it.
> Rest looks good, thanks
>
> --
> Mattijs Korpershoek <mkorpershoek@kernel.org>
Thanks,
--
Carlo Caione
next prev parent reply other threads:[~2026-11-03 16:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 12:24 [PATCH 0/6] Support fastboot boot in SPL Carlo Caione
2026-10-14 12:24 ` [PATCH 1/6] spl: fit: reject failures loading an explicitly requested FDT Carlo Caione
2026-11-03 10:09 ` Mattijs Korpershoek
2026-11-03 16:50 ` Carlo Caione
2026-11-03 21:34 ` Guillaume La Roque
2026-10-14 12:24 ` [PATCH 2/6] fastboot: invalidate stale and incomplete downloads Carlo Caione
2026-11-03 10:09 ` Mattijs Korpershoek
2026-11-03 21:35 ` Guillaume La Roque
2026-10-14 12:24 ` [PATCH 3/6] spl: ram: allow loading FIT images from a supplied buffer Carlo Caione
2026-11-03 10:09 ` Mattijs Korpershoek
2026-11-03 16:51 ` Carlo Caione [this message]
2026-10-14 12:24 ` [PATCH 4/6] spl: support booting FIT images downloaded with fastboot Carlo Caione
2026-11-03 10:09 ` Mattijs Korpershoek
2026-11-03 16:51 ` Carlo Caione
2026-10-14 12:24 ` [PATCH 5/6] spl: fastboot: support legacy U-Boot images Carlo Caione
2026-11-03 10:09 ` Mattijs Korpershoek
2026-11-03 21:35 ` Guillaume La Roque
2026-10-14 12:24 ` [PATCH 6/6] spl: fastboot: support raw " Carlo Caione
2026-11-03 10:09 ` Mattijs Korpershoek
2026-11-03 21:35 ` Guillaume La Roque
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=auoQVAmA6CWHVMaO@macbook \
--to=ccaione@baylibre.com \
--cc=alchark@flipper.net \
--cc=anton@binarly.io \
--cc=aristo.chen@canonical.com \
--cc=daniel@makrotopia.org \
--cc=francesco@valla.it \
--cc=khilman@baylibre.com \
--cc=lukma@nabladev.com \
--cc=marek.vasut+usb@mailbox.org \
--cc=marex@nabladev.com \
--cc=me@samcday.com \
--cc=michal.simek@amd.com \
--cc=mkorpershoek@kernel.org \
--cc=peng.fan@nxp.com \
--cc=pengpeng@iscas.ac.cn \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=xypron.glpk@gmx.de \
--cc=york.sun@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox