Re: [PATCH v6 0/4] initramfs: add support for xattrs in the initial ram disk

From: Mimi Zohar

Date: Fri Nov 20 2026 - 05:51:53 EST


Hi Christian,

On Tue, 2026-11-17 at 15:04 +0100, Christian Brauner wrote:
> If you want xattrs in the initramfs then that needs to be a proper,
> versioned cpio format that userspace tooling understands. I'm not
> taking METADATA!!!. So still no, sorry.

Regarding your request for a versioned cpio format, that is the first approach
we tried. I posted an RFC extending newc with xattrs in January 2015 [1],
followed by a v1 later that month [2], after Al Viro advised extending cpio at
the 2014 Kernel Summit. Taras Kondratiuk and Victor Kamensky carried the work
forward in 2018 as "newcx" [3]. The discussion then turned to redesigning the
format itself: ASCII fixed-width fields, no header length, the in-band
TRAILER!!! end marker, and whether to use pax/tar instead [4].

Roberto’s later series [5], carried forward by Danny Hu in v6 [6], aimed to
provide xattr support within the existing format, since the format discussion
had stalled. It began with xattrs in separate files and later moved to a
metadata file placed after each file it describes, following review comments
asking for self-contained per-file records that work when several initramfs
archives are loaded.

I wanted to share this background in case it’s useful to whoever takes on a new
versioned cpio format with xattr support.

Thanks,

Mimi

References:

[1] RFC, Jan 2015, extend initramfs archive format to support xattrs:
https://lore.kernel.org/all/1584934.WkKQGAFadF@sifl/T/
[2] v1, Jan 2015:
https://lore.kernel.org/lkml/1421781180-24425-1-git-send-email-zohar@xxxxxxxxxxxxxxxxxx/
[3] newcx v3, Feb 2018 (Taras Kondratiuk):
https://lore.kernel.org/all/1519153284.14218.18.camel@xxxxxxxxxxxxx/t/
[4] Why cpio rather than tar:
https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.rst
[5] v3, May 2019 (Roberto Sassu):
https://lore.kernel.org/lkml/20190517165519.11507-1-roberto.sassu@xxxxxxxxxx/
[6] v6, Nov 2026 (Danny Hu):
https://lore.kernel.org/linux-integrity/20261105193743.2654656-1-dannyhu@xxxxxxxxxx/