From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Norbert Lange <nolange79@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-kernel <linux-kernel@vger.kernel.org>,
Petr Malat <oss@malat.biz>, Kees Cook <keescook@chromium.org>,
Adam Borowski <kilobyte@angband.pl>,
Sedat Dilek <sedat.dilek@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Nick Terrell <terrelln@fb.com>
Subject: Re: [PATCH] arm: Add support for ZSTD compressed kernel
Date: Thu, 6 Aug 2020 11:11:45 +0100 [thread overview]
Message-ID: <20200806101145.GC1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <CADYdroPtiEfk9e3Loj-2qyyPqgx9GG-h3S2P2Uz49zrk4wVSTw@mail.gmail.com>
On Thu, Aug 06, 2020 at 10:45:42AM +0200, Norbert Lange wrote:
> Am Do., 6. Aug. 2020 um 02:30 Uhr schrieb Russell King - ARM Linux
> admin <linux@armlinux.org.uk>:
> >
> > On Thu, Aug 06, 2020 at 01:05:55AM +0200, Norbert Lange wrote:
> > > diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
> > > index 434a16982e34..1af01bfe6638 100644
> > > --- a/arch/arm/boot/compressed/head.S
> > > +++ b/arch/arm/boot/compressed/head.S
> > > @@ -614,7 +614,11 @@ not_relocated: mov r0, #0
> > > */
> > > mov r0, r4
> > > mov r1, sp @ malloc space above stack
> > > +#if defined(CONFIG_KERNEL_ZSTD)
> > > + add r2, sp, #0x30000 @ Context needs ~160K
> >
> > That's going to mess up kexec:
> >
> > /*
> > * The zImage length does not include its stack (4k) or its
> > * malloc space (64k). Include this.
> > */
> > len += 0x11000;
> >
> > I guess we need to add this to the information provided to kexec.
>
> Ouch, I guess it's rather impossible to load a new ZSTD kernel with a old
> kexec version in that case.
>
> Some ideas to fix that would be:
>
> - Increase the padding to "192K + 4K is enough for everyone" in kexec
> - Add the required/recommended stack+heap size to zImage so kexec can use it.
This is definitely preferred. See patches - though this is only the
kernel side. The first I've had for some time and isn't related to
this issue.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2020-08-06 11:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 23:05 [PATCH] arm: Add support for ZSTD compressed kernel Norbert Lange
2020-08-06 0:30 ` Russell King - ARM Linux admin
2020-08-06 8:45 ` Norbert Lange
2020-08-06 10:11 ` Russell King - ARM Linux admin [this message]
2020-08-06 10:12 ` [PATCH 1/2] ARM: add TEXT_OFFSET to decompressor kexec image structure Russell King
2020-08-06 10:12 ` [PATCH 2/2] ARM: add malloc size to decompressor kexec size structure Russell King
-- strict thread matches above, loose matches on Subject: below --
2020-08-06 21:46 [PATCH] arm: Add support for ZSTD compressed kernel Peter Geis
2020-08-06 22:22 ` Russell King - ARM Linux admin
2020-08-06 22:58 ` Peter Geis
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=20200806101145.GC1551@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=keescook@chromium.org \
--cc=kilobyte@angband.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=nolange79@gmail.com \
--cc=oss@malat.biz \
--cc=sedat.dilek@gmail.com \
--cc=terrelln@fb.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