From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Jonas Karlman <jonas@kwiboo.se>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Eddie James <eajames@linux.ibm.com>,
Matthew Garrett <mgarrett@aurora.tech>,
Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Sughosh Ganu <sughosh.ganu@linaro.org>
Subject: Re: [PATCH v2 0/3] booti: Remove the SYS_BOOTM_LEN limit for booti
Date: Tue, 6 May 2025 10:32:29 -0600 [thread overview]
Message-ID: <20250506163229.GY5430@bill-the-cat> (raw)
In-Reply-To: <CAFLszTgp0Y-yJVwE_ZBKKOXrqra6nRZqE-phPgQhA9Et99qcDg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2612 bytes --]
On Tue, May 06, 2025 at 03:24:21PM +0200, Simon Glass wrote:
> Hi Tom,
>
> On Mon, 5 May 2025 at 20:14, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Thu, May 01, 2025 at 07:18:32AM -0600, Simon Glass wrote:
> >
> > > This series restores the original behaviour of extlinux booting linux
> > > 'Image' files, which is to ignore CONFIG_SYS_BOOTM_LEN and instead uses
> > > a limit of 10x the compressed size.
> > >
> > > It also adds RISC-V support, since it uses a similar format to ARM64.
> > >
> > > Future work should integrate the code in 'booti' into main 'bootm'
> > > logic.
> >
> > I don't like "in the future we'll remove duplicated code".
>
> Small series, fixes a problem, can be made larger but then it isn't a bug-fix.
Which is why yes, this should have been instead of the however-many-part
"PXE" series, and then fixups on top, a series to address this problem.
Then other series to address other problems.
> > I also don't
> > like not seeing that what we really need to do, in all cases (not just
> > booti) handle decompression like we do for FIT images, and ask LMB to
> > give us a space to use.
>
> See bootm_load_os() which does already do this.
Yes, that's what I was asking you to look at. I assume you're even
specifically pointing to commit 69544c4fd8b1 ("bootm: Support
kernel_noload with compression") which you and I did together.
> > A problem is that CONFIG_SYS_BOOTM_LEN was never
> > intended to be the limit on *decompression* as it's the limit on what
> > we're loading to memory from disk. That's what getting me unhappy with
> > this part of the series.
>
> From what I can tell, that was introduced 11 years ago by this commit:
>
> 081cc197472 (HEAD) bootm: Export bootm_decomp_image()
>
> I suppose the idea is that BOOTM is supposed to be a limit on the
> image being loaded, so it is compressed, then the limit needs to apply
> to the size of the uncompressed image, to maintain parity. Otherwise
> there would be no limit at all, since it is pretty easy to devise an
> 100-byte image which expands to fill all available memory.
>
> Using 10x the uncompressed size doesn't fill me with the joys of spring, TBH.
Yes, it's a matter of heuristics, and also why we have things like lmb
to check and make sure we don't overwrite ourselves. I do not recall if
the 10x used there, or the 4x we used for kernel_noload FIT
decompression, was based on checking what the compression factor the
available algorithms get on typical kernel images or not. That would be
another improvement area, sure.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-05-06 16:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 13:18 [PATCH v2 0/3] booti: Remove the SYS_BOOTM_LEN limit for booti Simon Glass
2025-05-01 13:18 ` [PATCH v2 1/3] boot: Add a function to check if a linux Image is supported Simon Glass
2025-05-05 13:45 ` Tom Rini
2025-05-01 13:18 ` [PATCH v2 2/3] bootm: Add RISC-V support in booti_is_supported() Simon Glass
2025-05-05 15:07 ` Tom Rini
2025-05-01 13:18 ` [PATCH v2 3/3] booti: Allow using 10x the uncompressed size with booti Simon Glass
2025-05-05 18:14 ` [PATCH v2 0/3] booti: Remove the SYS_BOOTM_LEN limit for booti Tom Rini
2025-05-06 13:24 ` Simon Glass
2025-05-06 16:32 ` Tom Rini [this message]
2025-05-10 11:25 ` Simon Glass
2025-05-12 22:30 ` Tom Rini
2025-05-14 19:39 ` Simon Glass
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=20250506163229.GY5430@bill-the-cat \
--to=trini@konsulko.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=eajames@linux.ibm.com \
--cc=jonas@kwiboo.se \
--cc=mgarrett@aurora.tech \
--cc=mkorpershoek@baylibre.com \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@linaro.org \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.