Received: by 10.223.176.46 with SMTP id f43csp1008367wra; Fri, 26 Jan 2018 10:16:08 -0800 (PST) X-Google-Smtp-Source: AH8x227pKp1kSfBAHPgXkglZmW6zcMDIeBjldIock0eh70CEsxazFKtUeAM9Kyrl6sK+vjaoApA+ X-Received: by 10.101.97.67 with SMTP id o3mr16030094pgv.256.1516990568578; Fri, 26 Jan 2018 10:16:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516990568; cv=none; d=google.com; s=arc-20160816; b=vPXD6cuwc9UwR2v58jH40mLudw9MMCtspYU28AkDSx37SAPCNerGtjMRzt16c/lx73 eshFNv2HPOy949oZ3j/Z9IuXnHKTNUAoiqgBqVT4ilno25wRuevYa//8w3nwS16V4nEY EZ9fu9OB/jRx6Best0ph0hZDAaFQmjqF7xx/MntEwE+Bse7FUiA5vDT8s7s0cTCglxC0 crH6OCk5NBm44/xHYpNbrBw8YXms3/RFj9/eZDtrtXrIVtTFKhufgDzqOQoZlTZr4tpP qmEIpv59IxFSQtVxykWrrgWtWZNwS3ZVJ02RK2WNGhCzQXQkAJTgA0j1Apy/+pv6yesl RW8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature :arc-authentication-results; bh=NJf2f0Upq0CAamppuwilhVef/PhApJxPh+LJtE3oLGU=; b=NDN9UP4p/odiyBNaDxkopDi5JFy4cR08XgT2QLPGLdk7+hvEhgVS5pb/7XHwHQ4VK4 6tV/IsACzDa7QvWhj8+kFw9b0sYGYJu7XT1JgfQu97OoFQ9ySBBwYSjYFdCoYOFmA5p7 FmKQvOyHndJoCGEM+XjMTXnuT5ZK9NX58NYrJki+hALjLD/xoR1mwiAJmUVuYUPpPc/A s8342h7SaL0cpCh/FMVZTxfsBos8Q7Ism9xQtlZ86H/HEBuYfZ5fJTWwLk5iJj9BsqHI 1peeo5cJwnPxYEvrImC86u+OtwpT6xCEREdCRdbFYrhhaRe4b5i9E/G0fYsL8Qzy2+A+ DeZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hmh.eng.br header.s=fm1 header.b=hkxheyaK; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=W7Dm3v5w; 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 b17si6741342pfl.222.2018.01.26.10.15.54; Fri, 26 Jan 2018 10:16:08 -0800 (PST) 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=@hmh.eng.br header.s=fm1 header.b=hkxheyaK; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=W7Dm3v5w; 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 S1752474AbeAZSPV (ORCPT + 99 others); Fri, 26 Jan 2018 13:15:21 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:34529 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751641AbeAZSPQ (ORCPT ); Fri, 26 Jan 2018 13:15:16 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CF8D021181; Fri, 26 Jan 2018 13:15:15 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Fri, 26 Jan 2018 13:15:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hmh.eng.br; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=NJf2f0Upq0CAamppuwilhVef/PhApJxPh+LJtE3oLGU=; b=hkxheyaK gcDFev/ok7+8W/xGRb0M+tgfJ/1WvFmrFquXiAMIdE5zmPKt77GyHu2pyfSfMGDr yTch2A2i+SRRRipziHFErjTUoIXul71tCccbLUGgOWkQkAuLkJwAAOe74wRY2VI8 MI7w5wAg+3eP45lRTc5738LTOmvs3eVPjDaitAgP+crtHPiKSeIWSL7s9/c9bAz9 gdTsAE5ntujWlYgB8MAk1xdWLaMzaj5syMw0Ha7tU19HaOG0995eVdifkGPmNvyi F3IVfWAUkgUlgx7c8gY5ZXA/hoIuOgWreFsDSze9RJWtqWQqTdXjhUuouECuC3rb ZoQ0+iDWgJEM3w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=NJf2f0Upq0CAamppuwilhVef/PhAp JxPh+LJtE3oLGU=; b=W7Dm3v5wiOxGoSs0Y5wI1jyfsLN2htFKbvstl/J713vcC XD+EqzSeMX7QOpy74rs6SgEv9XBcZUTlHCpjY8mhoLGeglL+xYPnRNz3pLETGGtf hed7uKEvQZiN9zbRuD8s9PxGgdDsTwJ/3+8oEMUqeB4zepQUC9Mu4atw9NUZwJGE zA6+r/LkUUYE3IDcN70Jrej6rWxJjFouH58zPyTZHB6vJHSg6n6bldsxDelZueT/ EXQqaAEL/8vqbs//bdRk4sALYlxDE56uzVWRNb41NYiGRTvmXis63Ai+WWBJoUAR TsySlVnimYXSGbkORN3WecMGPA64u4hY05fT6tGOQ== X-ME-Sender: Received: from khazad-dum.debian.net (unknown [201.82.128.91]) by mail.messagingengine.com (Postfix) with ESMTPA id 5B6D47E0FA; Fri, 26 Jan 2018 13:15:15 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id D3A8C3400BDC; Fri, 26 Jan 2018 16:15:13 -0200 (-02) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum2.khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SC8lbfwKFOQF; Fri, 26 Jan 2018 16:15:13 -0200 (-02) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 271453400BD6; Fri, 26 Jan 2018 16:15:13 -0200 (-02) Date: Fri, 26 Jan 2018 16:15:13 -0200 From: Henrique de Moraes Holschuh To: Victor Kamensky Cc: Rob Landley , Arnd Bergmann , Taras Kondratiuk , "H. Peter Anvin" , Al Viro , Mimi Zohar , Jonathan Corbet , James McMechan , initramfs@vger.kernel.org, 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: <20180126181512.hnotac2lpxkj4ruv@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> <20180126103132.7szs5lj5ppm7eyy6@khazad-dum.debian.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Jan 2018, Victor Kamensky wrote: > On Fri, 26 Jan 2018, Henrique de Moraes Holschuh wrote: > > 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. > > My understanding that TRAILER is really used on tape devices, > there is no notion of file end in this case, it is just a stream of bytes > from char device. TRAILER is really used anywhere you can have several cpio archives concatenated, which is the exact case of a Linux initramfs, not just tape. The initramfs format takes *one or more* cpio archives, concatenated. Each archive may be independently compressed (using whatever supported compression method), or uncompressed[1]. EOF or size information can only tell you where the entire concatenated archive ends, not where each "segment" (independent cpio archive that was concatenated into the whole) ends. TRAILER is the only decent way to know the concatenation points. Knowing where these points are is necessary for the kernel, due to the way hardlink encoding is done on cpio archives: one has to reset the state of the hardlink-tracking table between cpio archives that were concatenated, for safety (and sysadmin sanity) reasons. [1] for the special case when one includes an "early initramfs" section for firmware (microcode, etc) updates, the archive(s) containing the firmware data must be uncompressed, and these archives must come before compressed archives in the concatenation. -- Henrique Holschuh