Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3242074imj; Mon, 11 Feb 2019 16:57:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IacZ4YWalplJ3IwkVlsXpBiUkHWbdhJUbT1FqA4xbeu9IcUjeqpxCW7U9g2UIXq3WTP9T4e X-Received: by 2002:a17:902:8a:: with SMTP id a10mr1222743pla.158.1549933032931; Mon, 11 Feb 2019 16:57:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549933032; cv=none; d=google.com; s=arc-20160816; b=kZoMYjdbRfYHIYPMqJ7zK6NHTE4hs1W1Krha8IpWUDXaR+Z54VHsUemCg8J9RxuQ2r LJuZfm8QPwXMbLqwrAQwQwj90RSHnLmlBzgQH7NOdOLXmbe7Zhji6wayY8mDSij/nt7n KkIBWmLbnYbXG4YYUJsldwJlQHtBd+ezxrIGGqMO9HmYQmICYq8PaoG3PcnisXvjzta8 i+B2V1kToDzcRPzSrBE9V+E5UwNNEjbeK+Tmhv+b6hjbyxU+PLF/nRsCfXkYM3RviuqL PWtrMSjc937pFNgDeH7SQqnT7m8e8bVbjxpoayl5YZDqcNDnYZFWT+pvNs3rb8b6Zu4j o7zQ== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=BTX9GwqNgqZ8AxJPkl9WDM5EX6peGpsIc24TecwoT7g=; b=dKGjwGFfEXtr3eqol4Q0OJFJS2jKAbWAmKKGj6ISkiP0FMvMnjHLK+7DY1RAi42eKd QTltAUZdI1I/Q/L5ZSXvlgtzG4H+TNYy8I86T/WPPR1aR5odJjjkcwYIHdP7Q+k91IG5 +ubcmmPk6qm2+9/oziwGGZZH+lio0ukzzHSRJxXF2YRNpygBFjGMtSZ5Sx0717PTV0PW DTOy+5GLKGP8i6zhmP/Xxs+Uma9VR6pkOkyWc/V5Ax2vNLX6K51zp5NU/lo/C42T0U0b +xQBUg0EflFtlFHL/PeTHvwCYHwMWracSE3/fklYMXcPkMM+WkWCFiYQosCIxeqbVWSS Entg== 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 c6si11156140plr.414.2019.02.11.16.56.56; Mon, 11 Feb 2019 16:57:12 -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 S1727959AbfBLA4l (ORCPT + 99 others); Mon, 11 Feb 2019 19:56:41 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:52680 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727630AbfBLA4l (ORCPT ); Mon, 11 Feb 2019 19:56:41 -0500 Received: from localhost.localdomain (c-73-223-200-170.hsd1.ca.comcast.net [73.223.200.170]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B87B6D460; Tue, 12 Feb 2019 00:56:39 +0000 (UTC) Date: Mon, 11 Feb 2019 16:56:38 -0800 From: Andrew Morton To: Andy Shevchenko Cc: David Engraf , Dominik Brodowski , Greg Kroah-Hartman , Philippe Ombredanne , Arnd Bergmann , Luc Van Oostenryck , Linux Kernel Mailing List Subject: Re: [PATCH RESEND] initramfs: cleanup incomplete rootfs Message-Id: <20190211165638.e7820ab0491bbef8a0ca960e@linux-foundation.org> In-Reply-To: References: <20181022134048.19693-1-david.engraf@sysgo.com> <20181030151805.5519-1-david.engraf@sysgo.com> <20190208140810.76ef6c25825a5644d9625f0a@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?