From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbeAZKbl (ORCPT ); Fri, 26 Jan 2018 05:31:41 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60987 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752090AbeAZKbi (ORCPT ); Fri, 26 Jan 2018 05:31:38 -0500 X-ME-Sender: Date: Fri, 26 Jan 2018 08:31:32 -0200 From: Henrique de Moraes Holschuh To: Rob Landley Cc: Arnd Bergmann , Taras Kondratiuk , "H. Peter Anvin" , Al Viro , Mimi Zohar , Jonathan Corbet , James McMechan , initramfs@vger.kernel.org, Victor Kamensky , linux-doc@vger.kernel.org, Linux Kernel Mailing List , LSM List , xe-linux-external@cisco.com Subject: Re: [PATCH v2 01/15] Documentation: add newcx initramfs format description Message-ID: <20180126103132.7szs5lj5ppm7eyy6@khazad-dum.debian.net> References: <1516850875-25066-1-git-send-email-takondra@cisco.com> <1516850875-25066-2-git-send-email-takondra@cisco.com> <0725a45f-45ee-7346-12ee-c3cc4b862654@landley.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0725a45f-45ee-7346-12ee-c3cc4b862654@landley.net> X-GPG-Fingerprint1: 4096R/0x0BD9E81139CB4807: C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Jan 2018, Rob Landley wrote: > That said, I don't think -h newcx should emit (or recognize) the > "TRAILER!!!1!" entry. That's kinda silly in-band signaling for 2018: > files have a length, pipes provide EOF, and each cpiox entry starts with > 6 bytes of c_magic anyway. (I stopped toybox from producing the TRAILER > entry back in june, toybox commit 32550751997d, and the kernel consumes > the resulting cpio just fine. All the trailer does is prevent you from > concatenating cpio files, which is a feature multiple people asked me for.) Not in the kernel. What TRAILER does in the kernel is to act as a barrier for the hardlink creation state, which IS a good thing. You could just specify it as such for "newcx". The kernel will continue reading for more entries after TRAILER, so concatenation is not broken by TRAILER. It is also insensitive to NUL-padding length (as long as it is 4-byte aligned), which is another nice feature you could specify for "newcx". Also, the kernel does something nothing in userspace ever tried to, AFAIK: it detects compression signatures along with the CPIO header signatures, and thus it can take several compressed and uncompressed archives concatenater together (and the compressor doesn't need to be the same, either). -- Henrique Holschuh