Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3546774imj; Tue, 12 Feb 2019 00:05:23 -0800 (PST) X-Google-Smtp-Source: AHgI3IY9S2C0ead5LIpOE/8xzz8+Lubn96+9A7RVlOMS66ZAt2+XEQV0xEpfxHMttUVLcV2NXj3M X-Received: by 2002:a17:902:7204:: with SMTP id ba4mr2796837plb.186.1549958723748; Tue, 12 Feb 2019 00:05:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549958723; cv=none; d=google.com; s=arc-20160816; b=CxhEGt+IAxzpWdGCyqd41o579/5zPrI/GKec49yONQCjP5yqJJw7WQiSuNn0ddaqA+ Q8Yr0GlNjWFPmCUqw+DHaZvhiWmP41U4JOTxaTGbb/6kYxwBxetqyC/Yk2I+h1lAc4rV SlsEr+/muokBUTTzKRAm7Uzzfo+2lyjNd3dEoT4lYlSbM1guspBtFWHT/xM54J+auiKw /3L314T19jAnq/VKt1HahfiblMypYmOAfATJRPQKkWyA6TcD9QC4VDCm+Jt2e9qrvg4v jYkjZ1VEDj31cw8WEFeE8JATPUgTwWPxkOww2JvRvDuMQ3ugjRuQ5OECd2fl1sDFQdFO R8dw== 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:date:message-id:from :references:cc:to:subject; bh=8CzS2xEeMNVzvvFLqw51kwqEWMxdsw0BbtTJD1BXbrY=; b=EZPgOl+EmylngHS9yfSIrJkrAp3MlU0pFQ4tY/X5q5co6OCGvslIkhXevtsJBIPgqy vjZZnOdWzyX6HOLIVatNwXTapgAyhEkhxByUKPiHR+2izDz+5GvIne4NpTOnfhjZ8gpO 0URjCbNQwIWN2TfxbUewP9H075Q9e0gesunC16gxOL08ex7KSEjf1v/5onFQYAKOiElH Q2odYEXJpRhQ2l2eOIQQncm4EcJ0pq+/SNlSytpFT7JUOX1AJiNQjxtCpBwccE8HJFQn kTDlmPeGDBh92B8KG9U1XnSTB3hpd0+3eXANsBbu77lDMhVti5fsGOUqEAmZ1gGJyWcp cclA== ARC-Authentication-Results: i=1; mx.google.com; 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 z2si8151045pfl.179.2019.02.12.00.05.07; Tue, 12 Feb 2019 00:05:23 -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; 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 S1728219AbfBLIE2 (ORCPT + 99 others); Tue, 12 Feb 2019 03:04:28 -0500 Received: from mail.sysgo.com ([176.9.12.79]:33946 "EHLO mail.sysgo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727509AbfBLIE2 (ORCPT ); Tue, 12 Feb 2019 03:04:28 -0500 Subject: Re: [PATCH RESEND] initramfs: cleanup incomplete rootfs To: Andrew Morton , Andy Shevchenko Cc: Dominik Brodowski , Greg Kroah-Hartman , Philippe Ombredanne , Arnd Bergmann , Luc Van Oostenryck , Linux Kernel Mailing List References: <20181022134048.19693-1-david.engraf@sysgo.com> <20181030151805.5519-1-david.engraf@sysgo.com> <20190208140810.76ef6c25825a5644d9625f0a@linux-foundation.org> <20190211165638.e7820ab0491bbef8a0ca960e@linux-foundation.org> From: David Engraf Message-ID: <3443b6a3-541e-0c37-2431-d86f95d45528@sysgo.com> Date: Tue, 12 Feb 2019 09:04:25 +0100 MIME-Version: 1.0 In-Reply-To: <20190211165638.e7820ab0491bbef8a0ca960e@linux-foundation.org> Content-Type: text/plain; charset=utf-8; format=flowed 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 12.02.19 at 01:56, Andrew Morton wrote: > On Sat, 9 Feb 2019 12:35:03 +0200 Andy Shevchenko wrote: > >> On Sat, Feb 9, 2019 at 12:08 AM Andrew Morton wrote: >>> On Fri, 8 Feb 2019 21:45:21 +0200 Andy Shevchenko wrote: >>>> On Tue, Oct 30, 2018 at 5:22 PM David Engraf wrote: >>>>> >>>>> Unpacking an external initrd may fail e.g. not enough memory. This leads >>>>> to an incomplete rootfs because some files might be extracted already. >>>>> Fixed by cleaning the rootfs so the kernel is not using an incomplete >>>>> rootfs. >>>> >>>> This breaks my setup where I have U-boot provided more size of >>>> initramfs than needed. This allows a bit of flexibility to increase or >>>> decrease initramfs compressed image without taking care of bootloader. >>>> The proper solution is to do this if we sure that we didn't get enough >>>> memory, otherwise I can't consider the error fatal to clean up rootfs. >>> >>> OK, thanks. Maybe David can suggest a fix - I'll queue up a revert >>> meanwhile. >>> >>> I don't really understand the failure. Why does an oversized initramfs >>> cause unpack_to_rootfs() to fail? >> >> In my case I have got "Junk in compressed archive". I don't know (I >> would check if needed) which exact condition I got since there are >> three places with this message. > > Well that's a plain irritating screwup right there. Could someone > please cook up a patch to give us three distinct (and hopefully more > informative) error messages? Done. BTW "invalid magic at start of compressed archive" is the error we get with the patch. Best regards - David