Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3801648yba; Sat, 11 May 2019 21:06:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlqfhufRfnl/fyd3RQBlF8k4MwERCjxiasPw01kcypwfAXUYmS/p8JVff2qP2tGzZcCWyP X-Received: by 2002:a63:4a5a:: with SMTP id j26mr23037540pgl.361.1557633978140; Sat, 11 May 2019 21:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557633978; cv=none; d=google.com; s=arc-20160816; b=0u34JuDz6YmEmYS6GrJp5xKmBeldFticaa0Z71y5Yt0eogNZBeCt19KYs43QMuK0/q YRxYjuqO1rtK/qVXMsjnErzSSVMXMPEccmkskMWKyhffgMUeV9l1MNrO/nL1L8A8PPkb /xvBRN6rOXSUiTDTM++IjRfG2NdLPAPnM8I8tVi6ar3vLuF5F/eiL1Xu4GNcCAtiexYf YT3ip6JKW5lZvmQKMeIXhsMAA2GRmIRycDflqq8ztUrMnnEWlN0NanvNuVTIHWp7vObd dqk7IAFV9HAVmFnfGG9B0C8DYI0OUgnU7nQp3k3hNtVpC4nCbHP0EGGarH5R+S3Dc0ow fpXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=RzgA+6+EFYb44zZTJjo6jx4GiNW1O3bLEXgu/Gl4EW0=; b=k6ram3fhwWtcoi4ZuB/6/1oShjEdR3LgvBxiV7j0m8gxBeBBZa+ra9O+aJwx2lnTk4 WRyfYXG3kl4iDniXG1mMCY6hutGpbVDydT/BS2U6lNbxd8RBuaPaAPM5B6rOdLOQkZn1 riUZyZ7UJjAA6SmGuyjUh7AR9ILZLpTyP4k4whsAXpCLEI8SE/qIceE3KylLvpdx2Lqw EcK0IYM4o24N9dL9y5werQ1YRZC7UOescSThcb0X1nkxEUBqKJ25nofvHggUbIEzzoxj 6DxVOOulhW11DWBoCrRMH3UJeNrNqzm/ugofPCVn2A4xv1Ac0fzp5bDh4lkkijaFluZ4 e0MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=mH00+FAR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si14353186pfr.47.2019.05.11.21.05.49; Sat, 11 May 2019 21:06:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=mH00+FAR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726135AbfELEEX (ORCPT + 99 others); Sun, 12 May 2019 00:04:23 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:38082 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbfELEEX (ORCPT ); Sun, 12 May 2019 00:04:23 -0400 Received: by mail-oi1-f196.google.com with SMTP id u199so7135071oie.5 for ; Sat, 11 May 2019 21:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RzgA+6+EFYb44zZTJjo6jx4GiNW1O3bLEXgu/Gl4EW0=; b=mH00+FARm1cnffwncJnuHa/IEVhAurR8VlnHoIyiRa7gPnNWcsYnzaFXy/oVMbU+bg TxxuFbIaa19bRZKWY7GfsDlwY8TS5qEJFN50c8eZt0b/Lkad3o1ylZ0RuBH4l+DSiBfj 5u/OLN81nsp+9ugAtwy9476uOl9anJFKjGhmLSqSKyoy9H1gdhcQVSiEK7ESPFI6Qlni +5QhXXOqAcY9j9TYlW6d3zRrJtppXQNjDH14/RGume/B3FtZ1sh628ZPmfhh8NbXMHyJ 1TeqLYc4PdW+2DY6K0cLzJzTKm1naXM8enyjDICjQ1GP17oZhJnTgdMkb3lOig9V5dXK Hrwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RzgA+6+EFYb44zZTJjo6jx4GiNW1O3bLEXgu/Gl4EW0=; b=hQlAHHPtKevDSxB0X3Nn6EIeEeTzH/ERGFdrBtM10+DlBibZQCzZiAKlYDR5MNuWGA JagqNykEaT/Fdg7sgo2fHYoMPtNBgvBb83VXANkwtL/vtvB4ROFpNnvvhL1lsL1aAZgV 5ZO/TKJD6AjF5mpvXxUyYGz4W/lrK7rCQQJxUpDSKaOLCXKTOOI3qSPWf9c1BG9b0Jfh GKngj5D2c0YFqaPaLA6Rj4hYu/2JklZn8mYyAG7GDHNaguFZO7k1xUVUhv2riDChtf8M RTXnI0PmCLtRW65GTGbOAy6RcwwApdEDquqxn+871ywdwdPy+L2EuJaZOufzMsvVQtWD PZFg== X-Gm-Message-State: APjAAAXd9R5jg3/f6Vwzj/GNPLuWrFBHbn1xrqnovBCs258uuSgBtFF0 E/Ykpg347YhUw8+b4ls6eJ76qA== X-Received: by 2002:a05:6808:46:: with SMTP id v6mr3990661oic.108.1557633862136; Sat, 11 May 2019 21:04:22 -0700 (PDT) Received: from [192.168.1.5] (072-182-052-210.res.spectrum.com. [72.182.52.210]) by smtp.googlemail.com with ESMTPSA id w5sm3610467otg.34.2019.05.11.21.04.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 May 2019 21:04:21 -0700 (PDT) Subject: Re: [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk To: Andy Lutomirski , Roberto Sassu Cc: Al Viro , LSM List , linux-integrity , initramfs@vger.kernel.org, Linux API , Linux FS Devel , LKML , Mimi Zohar , silviu.vlasceanu@huawei.com, dmitry.kasatkin@huawei.com, takondra@cisco.com, kamensky@cisco.com, "H. Peter Anvin" , Arnd Bergmann , james.w.mcmechan@gmail.com References: <20190509112420.15671-1-roberto.sassu@huawei.com> From: Rob Landley Message-ID: <4aee6e10-0eec-1d76-af66-dc8c7b68b766@landley.net> Date: Sat, 11 May 2019 23:04:49 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_....