[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <93b5c10e-747d-4164-9733-947a63b4f25d@zytor.com>
Date: Tue, 27 Jan 2026 14:08:07 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
David Disseldorp <ddiss@...e.de>
Cc: Christian Brauner <brauner@...nel.org>, Petr Mladek <pmladek@...e.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
Steven Rostedt <rostedt@...dmis.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v1 2/4] initramfs: Refactor to use hex2bin() instead of
custom approach
On 2026-01-20 13:17, Andy Shevchenko wrote:
>>
>> I.e. a "0x" isn't specified as valid prefix. I don't feel strongly
>> regarding diverging from existing behaviour,
>
>> but it should still be
>> considered (and documented) as a potentially user-visible regression.
>
> I disagree, this is not specified and should not be used. The CPIO archive in
> the original form doesn't specify leading 0 for octals (at least how I read it,
> please correct me, if I'm wrong).
>
> https://pubs.opengroup.org/onlinepubs/007908799/xcu/pax.html
>
This is the "newc" or "crc" format used by BSD (header magic 070701 and
070702, respectively), those were never standardized by POSIX.
These formats use 8-character hexadecimal (%08x).
As far as a 0x prefix, or upper case -- no, that is technically not according
to spec, but we DO NOT break user space tools that have been working for 20+
years, unless it is either (a) a security problem or (b) is holding back
further development (e.g. because the format is ambiguous. This is Postel's
law in action.
-hpa
Powered by blists - more mailing lists