From: nico@fluxnic.net (Nicolas Pitre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Clean up ARM compressed loader
Date: Thu, 25 Feb 2010 15:29:07 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.1002251507000.1946@xanadu.home> (raw)
In-Reply-To: <4B86D5D8.2010905@marcansoft.com>
On Thu, 25 Feb 2010, Hector Martin wrote:
> Compilers are getting smarter, and code relying on old assumptions that
> may no longer be true (because compilers optimize better or do things
> differently) is precisely that which is most liable to break. The only
> way you can properly guarantee things will work is by sticking to actual
> standards and doing what the compiler expects you to do. Moving around
> text/rodata without moving around bss/(maybe data) isn't something
> allowed by the compiler. Sure, you can hack around it like we're doing
> here, but you're relying on your hacks correctly preventing the compiler
> from doing something valid yet which breaks your assumptions.
Sure. And so far we've used a naive hack with -Dstatic. Russell's
patch is now removing the hack and making sure the restrictions we count
on are respected wrt .data section. If we need to ensure no static .bss
variable are used we might just add this in the Makefile:
[ "$(nm compressed/vmlinux | grep " b ")" != "" ]
> Well, if you're into speed anyway, caring about the actual kernel size
> is desirable because it avoids a totally useless copy when the zImage is
> loaded into RAM somewhere near the end of where the kernel would be. The
> guesstimate in the code will think it'll overlap and move things around
> unnecessarily. Worse, if the kernel ends up being highly compressible
> for whatever reason, it could overflow the 4x guesstimate and make the
> whole compressed loader fail again if it happens to be around there.
Those are valid points, and rather orthogonal to the ROMable
decompressor issue. Better not to mix them together.
And I vaguely remember trying to do just that a couple years ago:
getting hold of the decompressed kernel size and feeding that into the
decompressor code. I somehow didn't come up with a satisfactory
solution and never revisited it since.
> But this discussion is rather pointless because at this stage I highly
> doubt Russell is going to change his mind.
If you produce a patch for the above, and it is clean and portable, then
I suspect he would just merge it. Only at that point we could
reconsider the ROMable decompressor issue.
Nicolas
next prev parent reply other threads:[~2010-02-25 20:29 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 2:23 [PATCH] Clean up ARM compressed loader Hector Martin
2010-02-24 8:51 ` Uwe Kleine-König
2010-02-24 9:28 ` Hector Martin
2010-02-24 22:34 ` Russell King - ARM Linux
2010-02-24 23:34 ` Nicolas Pitre
2010-02-24 23:42 ` Russell King - ARM Linux
2010-02-24 23:57 ` Hector Martin
2010-02-25 0:01 ` Russell King - ARM Linux
2010-02-25 0:30 ` Hector Martin
2010-02-25 4:28 ` Nicolas Pitre
2010-02-25 4:33 ` Nicolas Pitre
2010-02-25 9:38 ` Russell King - ARM Linux
2010-02-25 10:05 ` Hector Martin
2010-02-25 18:35 ` Nicolas Pitre
2010-02-25 19:21 ` Hector Martin
2010-02-25 19:40 ` Nicolas Pitre
2010-02-25 19:56 ` Hector Martin
2010-02-25 20:29 ` Nicolas Pitre [this message]
2010-02-25 21:05 ` Russell King - ARM Linux
2010-02-25 21:25 ` Nicolas Pitre
2010-02-25 20:30 ` Russell King - ARM Linux
2010-02-25 12:24 ` Russell King - ARM Linux
2010-02-25 19:24 ` Nicolas Pitre
2010-02-25 19:34 ` Russell King - ARM Linux
2010-02-25 23:48 ` Russell King - ARM Linux
2010-02-25 23:55 ` Russell King - ARM Linux
2010-02-25 9:51 ` Hector Martin
2010-02-25 18:30 ` Nicolas Pitre
2010-02-25 8:23 ` Russell King - ARM Linux
2010-02-25 4:06 ` Nicolas Pitre
-- strict thread matches above, loose matches on Subject: below --
2010-02-23 13:57 hector at marcansoft.com
2010-02-23 14:07 ` Russell King - ARM Linux
2010-02-24 8:42 ` Uwe Kleine-König
2010-02-24 9:27 ` Hector Martin
2010-02-24 11:03 ` Russell King - ARM Linux
2010-02-24 15:20 ` Hector Martin
2010-02-24 15:30 ` Uwe Kleine-König
2010-02-24 22:09 ` Hector Martin
2010-02-24 22:30 ` Russell King - ARM Linux
2010-02-25 0:01 ` Hector Martin
2010-02-24 16:29 ` Russell King - ARM Linux
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=alpine.LFD.2.00.1002251507000.1946@xanadu.home \
--to=nico@fluxnic.net \
--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).