From: Michael Tokarev <mjt@tls.msk.ru>
To: Alain Knaff <alain@knaff.lu>
Cc: Tvrtko Ursulin <tvrtko.ursulin@sophos.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: 2.6.33-rc1: LZMA kernel fails to decompress
Date: Sun, 27 Dec 2009 23:19:37 +0300 [thread overview]
Message-ID: <4B37C159.5080202@msgid.tls.msk.ru> (raw)
In-Reply-To: <4B37AC87.1070607@knaff.lu>
Alain Knaff wrote:
> Michael Tokarev wrote:
>> Tvrtko Ursulin wrote:
>>> Hi,
>>>
>>> When run under VMware, LZMA compressed 2.6.33-rc1 instantly reboots in the
>>> decompression stage. At least I suppose so, because switching to GZIP makes
>>> it work.
>> Switch /bin/sh from dash to bash and recompile (actually relink) - it should work.
>>
>> /mjt
>
> I can confirm this. A similar issue used to exist for older kernels,
> which then got fixed by replacing "echo" with "/bin/echo" in the
> size_append command scripts/Makefile.lib . The reason why this was
> needed is that some shells (such as dash) have a defective built-in echo
> command. Specifying the full path forces to use the system echo command
> rather than the broken shell builtin.
>
> In 2.6.33, for some reason, echo has been replaced with printf. With a
> _pathless_ printf! The fix is the same as in earlier kernels: add the path.
It should be pathless, or else we'll come to issue when printf is in /bin
vs /usr/bin and the like.
But you're wrong, and this has been discussed already in this very thread.
Neither approach is right. The whole issues is not because of "defects"
in sh or printf or echo, but because of over-expectations. POSIX does not
specify that printf should support \x (hexadecimal) escape sequences or
that echo should interpret _any_ escape sequences at all. "Non-defective"
system echo is *extension* to standard. Set $POSIXLY_CORRECT with GNU
echo or printf and you should have the same issue again.
> With the attached patch applied, the kernel compiles correctly even if
> sh is linked to dash.
What I think should be done here is to revert my patch (that replaces
/bin/echo with printf, so that /bin/echo will be used) and test the
real solution, which is to stop doing all this hackery altogether,
and calculate the size the right way instead. Sam already posted a
possible solution, and it seems to be correct.
/mjt
next prev parent reply other threads:[~2009-12-27 20:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-21 16:43 2.6.33-rc1: LZMA kernel fails to decompress Tvrtko Ursulin
2009-12-21 16:45 ` Tvrtko Ursulin
2009-12-21 21:43 ` Michael Tokarev
2009-12-27 18:50 ` Alain Knaff
2009-12-27 20:19 ` Michael Tokarev [this message]
2009-12-28 19:34 ` H. Peter Anvin
2009-12-28 22:15 ` John Stoffel
2009-12-28 23:05 ` H. Peter Anvin
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=4B37C159.5080202@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=alain@knaff.lu \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tvrtko.ursulin@sophos.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