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]
Date:	Sun, 20 Dec 2009 13:47:13 +0300
From:	Michael Tokarev <mjt@....msk.ru>
To:	Willy Tarreau <w@....eu>
CC:	Sam Ravnborg <sam@...nborg.org>, Michal Marek <mmarek@...e.cz>,
	Michael Guntsche <mike@...loops.com>,
	Oliver Hartkopp <oliver@...tkopp.net>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kbuild: correct size calculation of bzImgae / fix x86
 boot

Willy Tarreau wrote:
> On Sun, Dec 20, 2009 at 11:03:44AM +0100, Sam Ravnborg wrote:
>> We use ... printf \x ... when calculating the size of the
>> compressed kernel.
>> Unfortunately dash built-in printf does not support this notation
>> resulting in a non-bootable kernel.
>>
>> Fix this by always using the external version of printf.
> 
> Do we really want to workaround shells bugs ? I mean, either

There's no bugs in dash, as far as I can see.  According to
POSIX, a) echo does not need to interpret _any_ escape sequences
at all, and b) printf is not required to interpret \x sequences.
Ref:

http://www.opengroup.org/onlinepubs/000095399/utilities/echo.html
...
  string
    A string to be written to standard output. If the first operand is -n,
    or if any of the operands contain a backslash ( '\' ) character,
   the results are implementation-defined.

    [XSI] On XSI-conformant systems, [..] the following character sequences
    shall be recognized on XSI-conformant systems within any of the arguments:

    \a \b \c \f \n \r \t \v \\
    \0num
        Write an 8-bit value that is the zero, one, two, or three-digit octal
        number num.

http://www.opengroup.org/onlinepubs/000095399/utilities/printf.html

 In addition to the escape sequences shown in the Base Definitions volume of IEEE
 Std 1003.1-2001, Chapter 5, File Format Notation ( '\\', '\a', '\b', '\f', '\n',
 '\r', '\t', '\v' ), "\ddd", where ddd is a one, two, or three-digit octal number,
 shall be written as a byte with the numeric value specified by the octal number.

[]
> The more absolute paths we specify, the less portable the
> build system. And if linking /bin/sh to whatever shell works
> but linking it to dash breaks, it's a shell bug.

Yes for absolute paths, and no for dash, see above.

/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