From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: compressed: discard ksym/kcrctab input section
Date: Mon, 23 Oct 2017 23:29:54 +0100 [thread overview]
Message-ID: <20171023222954.GY20805@n2100.armlinux.org.uk> (raw)
In-Reply-To: <c633c2ad-0344-385f-273a-a2eb9a39d7e3@gmail.com>
On Mon, Oct 23, 2017 at 11:32:11PM +0200, Matthias Brugger wrote:
> For the record, gcc7 has a alignment problem which was fixed for PR82445 [1].
>
> I tried to boot with the aforementioned patch from Arnd and the fixed
> gcc, but that didn't help.
That's because we have two entirely separate problems here, both leading
to the same "it doesn't boot" outcome.
1. We have additional bytes in the zImage file after _edata, which
means that appending a dtb using the usual "cat" method doesn't
work. We look for the appended dtb at _edata.
2. Misaligned loads in the decompressor causing faults.
While removing "sort" and the ksymtab sections appears to fix the
problem, it does so by removing the troublesome sections. However,
what it's actually highlighting is that we have more fundamental
issues here.
Additional sections that are not mentioned in the linker script
will be passed through by the linker to the output file, and can
result in exactly the same issue. So, a patch that discards the
current sections doesn't really fix the issue, it papers it over.
I also feel that removing the "sort" code from the EFI stub also
papers over the problem. Both of those remove the /current/ cause
of a more fundamental problem without addressing that fundamental
problem.
I'm not saying we shouldn't discard the sections, I'm saying we
need to do more to detect the fundamental problem, rather than
hiding it.
That fundamental problem is that we allow the build to succeed
when the results of the build are obviously incorrect. I've
proposed a patch that causes the copy of vmlinux to zImage to
fail if the zImage size does not match the expected size of the
binary image.
We should also eliminate the reason for (2), which is what Arnds
patch addresses.
So, in total, I think we need three patches:
1. Arnds patch to fix the alignment issues.
2. My patch to detect wrong zImage size.
3. A patch to discard troublesome sections.
Optionally, removal of the sort code from the EFI stub is an
orthogonal issue - the sort code is merely the vehicle by which
the real problems have been found.
--
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-10-23 22:29 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-08 15:31 [PATCH] ARM: compressed: discard ksym/kcrctab input section Ard Biesheuvel
2017-09-08 15:39 ` Gregory CLEMENT
2017-09-08 15:41 ` Ard Biesheuvel
2017-10-04 12:16 ` Gregory CLEMENT
2017-10-04 12:20 ` Ard Biesheuvel
2017-10-04 12:43 ` Russell King - ARM Linux
2017-10-09 12:39 ` Ard Biesheuvel
2017-10-12 9:24 ` Gregory CLEMENT
2017-10-12 9:45 ` Russell King - ARM Linux
2017-10-12 19:03 ` Ard Biesheuvel
2017-10-20 15:25 ` Gregory CLEMENT
2017-10-20 15:28 ` Ard Biesheuvel
2017-10-20 16:11 ` Russell King - ARM Linux
2017-10-20 16:20 ` Ard Biesheuvel
2017-10-20 16:32 ` Russell King - ARM Linux
2017-10-20 16:36 ` Ard Biesheuvel
2017-10-20 16:54 ` Russell King - ARM Linux
2017-10-20 17:12 ` Ard Biesheuvel
2017-10-21 7:56 ` Matthias Brugger
2017-10-21 8:14 ` Ard Biesheuvel
2017-10-22 22:00 ` Matthias Brugger
2017-10-23 9:29 ` Russell King - ARM Linux
2017-10-23 11:48 ` Russell King - ARM Linux
2017-10-23 21:17 ` Matthias Brugger
2017-10-23 22:19 ` Russell King - ARM Linux
2017-10-24 6:51 ` Matthias Brugger
2017-10-23 21:15 ` Matthias Brugger
2017-10-23 21:32 ` Matthias Brugger
2017-10-23 22:29 ` Russell King - ARM Linux [this message]
2017-10-24 8:36 ` Andrea Adami
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=20171023222954.GY20805@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).