linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Andy Lutomirski <luto@kernel.org>,
	Roberto Sassu <roberto.sassu@huawei.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	LSM List <linux-security-module@vger.kernel.org>,
	linux-integrity <linux-integrity@vger.kernel.org>,
	initramfs@vger.kernel.org, Linux API <linux-api@vger.kernel.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Mimi Zohar <zohar@linux.vnet.ibm.com>,
	silviu.vlasceanu@huawei.com, dmitry.kasatkin@huawei.com,
	takondra@cisco.com, kamensky@cisco.com,
	"H. Peter Anvin" <hpa@zytor.com>, Arnd Bergmann <arnd@arndb.de>,
	james.w.mcmechan@gmail.com
Subject: Re: [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk
Date: Sat, 11 May 2019 23:04:49 -0500	[thread overview]
Message-ID: <4aee6e10-0eec-1d76-af66-dc8c7b68b766@landley.net> (raw)
In-Reply-To: <CALCETrXy7gqmmy37=nrMAisGadZ+qbjZjXtWFF8Crq86xNpsfA@mail.gmail.com>

On 5/11/19 5:44 PM, Andy Lutomirski wrote:
> I read some of those emails.  ISTM that adding TAR support should be
> seriously considered.  Sure, it's baroque, but it's very, very well
> supported, and it does exactly what we need.

Which means you now have two parsers supported in parallel forevermore, and are
reversing the design decision initially made when this went in without new info.

Also, I just did a tar implementation for toybox: It took me a month to debug it
(_not_ starting from scratch but from a submission), I only just added sparse
file support (because something in the android build was generating a sparse
file), there are historical tarballs I know it won't extract (I'm just testing
against what the current one produces with the default flags), and I haven't
even started on xattr support yet.

Instead I was experimenting with corner cases like "S records replace the
prefix[] field starting at byte 386 with an offset/length pair array, but
prefix[] starts at 345, do those first 41 bytes still function as a prefix and
is there any circumstance under which existing tar binaries will populate them?
Also, why does every instance of an S record generated by gnu/tar end with a
gratuitous length zero segment?"

"cpio -H newc" is a _much_ simpler format. And posix no longer specifies
_either_ format usefully, hasn't for years. From toybox tar's header comment:

 * For the command, see
 *   http://pubs.opengroup.org/onlinepubs/007908799/xcu/tar.html
 * For the modern file format, see
 *
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06
 *   https://en.wikipedia.org/wiki/Tar_(computing)#File_format
 *   https://www.gnu.org/software/tar/manual/html_node/Tar-Internals.html

And no, that isn't _enough_ information, you still have to "tar | hd" a lot and
squint. (There's no current spec, it's pieced together from multiple sources
because posix abdicated responsibility for this to Jorg Schilling.)

Rob

P.S. Yes that gnu/dammit page starts with a "this will be deleted" comment which
according to archive.org has been there for over a dozen years.

P.P.S. Sadly, if you want an actually standardized standard format where
implementations adhere to the standard: IETF RFC 1991 was published in 1996 and
remains compatible with files an archivers in service. Or we could stick with
cpio and make minor changes to it, since we have to remain backwards compatible
with it _anyway_....

  reply	other threads:[~2019-05-12  4:04 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 11:24 [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk Roberto Sassu
2019-05-09 11:24 ` [PATCH v2 1/3] fs: add ksys_lsetxattr() wrapper Roberto Sassu
2019-05-10 21:28   ` Jann Horn
2019-05-09 11:24 ` [PATCH v2 2/3] initramfs: set extended attributes Roberto Sassu
2019-05-09 11:24 ` [PATCH v2 3/3] initramfs: introduce do_readxattrs() Roberto Sassu
2019-05-10 21:33   ` Jann Horn
2019-05-13 13:03     ` Roberto Sassu
2019-05-09 18:34 ` [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk Rob Landley
2019-05-10  6:56   ` Roberto Sassu
2019-05-10 11:49     ` Mimi Zohar
2019-05-10 20:46       ` Rob Landley
2019-05-10 22:38         ` Mimi Zohar
2019-05-11 22:44 ` Andy Lutomirski
2019-05-12  4:04   ` Rob Landley [this message]
2019-05-12  4:12     ` Rob Landley
2019-05-12  9:17 ` Dominik Brodowski
2019-05-12 10:18   ` hpa
2019-05-12 15:31     ` Dominik Brodowski
2019-05-13  0:02       ` Mimi Zohar
2019-05-13  0:21         ` hpa
2019-05-13  0:23       ` hpa
2019-05-12 12:52   ` Mimi Zohar
2019-05-12 17:05     ` Rob Landley
2019-05-12 19:43       ` Arvind Sankar
2019-05-13  7:49         ` Roberto Sassu
2019-05-13  9:07           ` Rob Landley
2019-05-13 12:08             ` Mimi Zohar
2019-05-13 12:47             ` Roberto Sassu
2019-05-13 17:20               ` Arvind Sankar
2019-05-13 17:51                 ` Arvind Sankar
2019-05-13 17:52                 ` Arvind Sankar
2019-05-13 18:36                   ` Mimi Zohar
2019-05-13 18:47                     ` Arvind Sankar
2019-05-13 22:09                       ` Mimi Zohar
2019-05-14  6:06                         ` Rob Landley
2019-05-14 14:44                           ` Arvind Sankar
2019-05-14  6:06               ` Rob Landley
2019-05-14 11:52                 ` Roberto Sassu
2019-05-14 15:12                   ` Rob Landley
2019-05-14 15:27                   ` Arvind Sankar
2019-05-14 15:57                     ` Arvind Sankar
2019-05-14 17:44                       ` Roberto Sassu
2019-05-15  1:00                         ` Arvind Sankar
2019-05-14 15:19               ` Andy Lutomirski
2019-05-14 16:33                 ` Roberto Sassu
2019-05-14 16:58                   ` Greg KH
2019-05-14 17:20                     ` Roberto Sassu
2019-05-15  0:25                       ` Arvind Sankar
2019-05-14 19:18                 ` James Bottomley
2019-05-14 23:39                   ` Rob Landley
2019-05-14 23:54                     ` James Bottomley
2019-05-15  0:52                       ` Arvind Sankar
2019-05-15 11:19                         ` Roberto Sassu
2019-05-15 16:08                           ` Arvind Sankar
2019-05-15 17:06                             ` Roberto Sassu
2019-05-16  5:29                               ` Arvind Sankar
2019-05-16 11:42                                 ` Roberto Sassu
2019-05-16 13:31                                 ` Mimi Zohar

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=4aee6e10-0eec-1d76-af66-dc8c7b68b766@landley.net \
    --to=rob@landley.net \
    --cc=arnd@arndb.de \
    --cc=dmitry.kasatkin@huawei.com \
    --cc=hpa@zytor.com \
    --cc=initramfs@vger.kernel.org \
    --cc=james.w.mcmechan@gmail.com \
    --cc=kamensky@cisco.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=roberto.sassu@huawei.com \
    --cc=silviu.vlasceanu@huawei.com \
    --cc=takondra@cisco.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zohar@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).