From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: verify size of zImage
Date: Tue, 28 Nov 2017 16:37:14 +0000 [thread overview]
Message-ID: <20171128163714.GA8356@n2100.armlinux.org.uk> (raw)
In-Reply-To: <CAKv+Gu-oXSpUcJ6acBKyohQ3WxSDp3sK7A4No2y4CHCFw1kSaQ@mail.gmail.com>
On Tue, Nov 28, 2017 at 04:32:42PM +0000, Ard Biesheuvel wrote:
> (+ Gregory)
>
> On 28 November 2017 at 16:27, Russell King <rmk+kernel@armlinux.org.uk> wrote:
> > The linker can sometimes add additional sections to the zImage ELF file
> > which results in the zImage binary being larger than expected. This
> > causes appended DT blobs to fail.
> >
> > Verify that the zImage binary is the expected size, and fail the build
> > if this is not the case.
> >
> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> > ---
> > As this patch is different, I've dropped Matthias' tested-by. I'd
> > appreciate a replacement, thanks. Also, I seem to remember that
> > Ard's toolchain was giving issues - maybe this alternative will
> > finally resolve them.
> >
>
> $ nm arch/arm/boot/compressed/vmlinux |grep _edata
> 007b8200 D _edata
> 007b8200 D _edata_real
>
> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> although I don't remember seeing this fail. It think it may have been
> Gregory who was having these issues?
The failing case was with a few ld versions when we had:
ASSERT(. == _edata, "error: zImage file size is incorrect");
in place of the _edata_real assignment. Yet, those very same linkers
have shown that they set _edata_real to the same value as _edata.
I forget who had the problem, sorry.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
next prev parent reply other threads:[~2017-11-28 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 16:27 [PATCH] ARM: verify size of zImage Russell King
2017-11-28 16:32 ` Ard Biesheuvel
2017-11-28 16:37 ` Russell King - ARM Linux [this message]
2017-12-12 16:08 ` Gregory CLEMENT
2017-12-12 18:02 ` Ard Biesheuvel
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=20171128163714.GA8356@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).