lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B37C159.5080202@msgid.tls.msk.ru>
Date:	Sun, 27 Dec 2009 23:19:37 +0300
From:	Michael Tokarev <mjt@....msk.ru>
To:	Alain Knaff <alain@...ff.lu>
CC:	Tvrtko Ursulin <tvrtko.ursulin@...hos.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: 2.6.33-rc1: LZMA kernel fails to decompress

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ