From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753203AbdFMAYy (ORCPT ); Mon, 12 Jun 2017 20:24:54 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:38757 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753168AbdFMAYx (ORCPT ); Mon, 12 Jun 2017 20:24:53 -0400 X-ME-Sender: X-Sasl-enc: SYuY49Khqki0e7e8p6ooQYE5HqrrD45fcB1x01BLV0H/ 1497313492 Date: Mon, 12 Jun 2017 21:24:49 -0300 From: Henrique de Moraes Holschuh To: Marcin Szewczyk Cc: linux-kernel@vger.kernel.org Subject: Re: An inconsistent behaviour if using built-in initramfs and damaged external one Message-ID: <20170613002449.GC25393@khazad-dum.debian.net> References: <20170612201502.GA3272@orkisz> <20170613000622.GB25393@khazad-dum.debian.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170613000622.GB25393@khazad-dum.debian.net> X-GPG-Fingerprint1: 4096R/0x0BD9E81139CB4807: C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Jun 2017, Henrique de Moraes Holschuh wrote: > So, you can just have /kernel/x86/microcode/.bin > (without leading /kernel, /kernel/x86, /kernel/x86/microcode) in an > early initramfs, and it will *work* for early microcode update purposes. ... > So, if the early initramfs has a/, a/b, and e/f/g/h, the kernel can use > a/b and e/f/g/h for early initramfs purposes (e.g. microcode updates, > ACPI table overrides, etc), but only a/ and a/b are likely to be present > in the final initramfs. e/f/g/h will likely be dropped, because some > leading path components are missing (e/, e/f, e/f/g)... *unless* they > were created by a previously-loaded initramfs segment. > > I am not aware of anything that makes use of this behavior, but it is > there since early initramfs images were introduced. I better clarify this one. I don't know of anything that makes use of this behavior *with the purpose of dropping uneeded files from the final initramfs*. iucode_tool[1] can optionally make use of the exact early initramfs semanthics to shrink its size to the absolute minimum. That means it will use the "doesn't require leading directory entries" feature, as well as a 16-byte block size. [1] https://gitlab.com/iucode-tool/iucode-tool/wikis/home -- Henrique Holschuh