Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp517174imj; Sat, 9 Feb 2019 02:35:38 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibb5EMKWrzUwr+E/qAt74kXQbo8buAm9dbsuCm8e2HKz4LjSUW9uxB8Q1XlaiFraRA1ctkF X-Received: by 2002:a63:b24a:: with SMTP id t10mr24092318pgo.223.1549708538635; Sat, 09 Feb 2019 02:35:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549708538; cv=none; d=google.com; s=arc-20160816; b=py20oRLjcA3ThKi9UP/fCHTYPEVRzZbHMm84r2Dqf07PnfjuoJLyzLgSFaJ3g/Tm1a eETdNOUfcpRuvEzirl9WS5PVbex5rDaHYm034Ak1cs+m4+0WXlQVIw+6NbwTOYInwWbq d24Yn4iy0keES2/xvBIx/mALg5i0gDZY6Cs2ikl05i7bDn5uOFXoqMd0kQGOrAU8PW50 A8GtRI8gtNFzmGaNHE7xnortRHzeQ+wgmDQkAzhOhT+OtT0IcpTHQ1xf7dToWwRKDFqc 85ILgr6IS/a7Zm9td4CO/kgEWcZWg5eB/Wjh7HlMt1NKf4IdAAWrI00oTsBddl3aAD4D GiFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qnAp/jDBF3KApSzXGIlpKmmaIHDtvrtAEVH8ml+PxCk=; b=uZ9Po5NY0zqHpES/Cjp2zeFZBIDDY5DIHKICLXWoS0dixJfHvhRbuuER39eP4DB5M/ 7Qh1qkOnQKQzvxWXzwuIZ2Xk9XeDZU0EN3yWs6fYaSjeZwsyVEZ1PmxmJazcsMDfkzNw hHwmS3hO6w1a4F7dp1Ia/FzS5dvk3dXDAW+3en50X0199OH79d028YXfuM+ICmnGFmYN 7XzZlFfEUYyrzllBOO8zU341SYrQRqnHEsxb8IKEbD/jqFQP3MN0F1R3bhuZj9RAGBBM QyjBi7Ma404mElm/HMTTj+6xcXv2R4ZejxGsTH7oKkeuk65L0zT7Q2h+M0Jzo4W//US6 4woA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qUgUW16s; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si4340249pgv.292.2019.02.09.02.35.20; Sat, 09 Feb 2019 02:35:38 -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=@gmail.com header.s=20161025 header.b=qUgUW16s; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726892AbfBIKfQ (ORCPT + 99 others); Sat, 9 Feb 2019 05:35:16 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:39738 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726722AbfBIKfQ (ORCPT ); Sat, 9 Feb 2019 05:35:16 -0500 Received: by mail-pf1-f193.google.com with SMTP id f132so2884572pfa.6 for ; Sat, 09 Feb 2019 02:35:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qnAp/jDBF3KApSzXGIlpKmmaIHDtvrtAEVH8ml+PxCk=; b=qUgUW16sncFk21q3SM4JL9b8FJAXwYqbn3ppsavHQU0K60k3yUZYbxscYUBMcElWlO giQB6mLTb4Bj+QLqJIcBnTtn1Bou0m05neXQoxEXfNPURrjxT7IuiUyxYkWfa/Ik5Bao vs4T5yrqz9YdnaheRHEQDNp9jUeZYfSf8Qo3QqyaB9KGh8yKrMOWOcUxgo1B88qG4KLu u8cO2wnx5u3lgxr/E8IcHtN9kY55Daj6FFfDOwPlSbFYB+Km9P7QH6wVDvRMI+0ipIxN tgBuz/hOJftJvU7kp8PKiQA55AC/ItSSXRSWDoE5lMjdhTylL1AcdlrFaY/CLhZx+4OU 3Qag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qnAp/jDBF3KApSzXGIlpKmmaIHDtvrtAEVH8ml+PxCk=; b=IKmn2iAYHdJgF0SxJ5mfgy9efnddo0zQoarUiOukp3+tXbZcNuvin3PCSPvwqN9yNP b/MhU2dmiu3R06X9GOsU128hwSrkh/IGB0LAAv1MolOosX+7AFs2CKDdrT2wtVhqS8t9 7L2/9VZuXCzNLcur4QsR4gooQZMr41+dZ+W1alr++jVzONf0rMoyB5ZfVA+fTAzN8jzT HyXsY7Exk1f0FI+pAgD7QUEYqkBzUIZD9RTJMiPs/h2SSnPajSrZFIutegBxkO65D8Fe ucEW5olo9QLvR3e+tHgkEVyO+Hsqp4WOofLA9m5IVbCSTVgJsBe/0iE0Kasrw2/byT2u vUcg== X-Gm-Message-State: AHQUAua5FEFRl7ys4JECbWcrxfUXbf1oK4MXvgvZtBBCQT8TyFBakFBK uu2WUY4Lvy1Ra3ccFjGZddSsOqcNSq+gkdXh9yg= X-Received: by 2002:aa7:82d5:: with SMTP id f21mr6223002pfn.50.1549708515150; Sat, 09 Feb 2019 02:35:15 -0800 (PST) MIME-Version: 1.0 References: <20181022134048.19693-1-david.engraf@sysgo.com> <20181030151805.5519-1-david.engraf@sysgo.com> <20190208140810.76ef6c25825a5644d9625f0a@linux-foundation.org> In-Reply-To: <20190208140810.76ef6c25825a5644d9625f0a@linux-foundation.org> From: Andy Shevchenko Date: Sat, 9 Feb 2019 12:35:03 +0200 Message-ID: Subject: Re: [PATCH RESEND] initramfs: cleanup incomplete rootfs To: Andrew Morton Cc: David Engraf , Dominik Brodowski , Greg Kroah-Hartman , Philippe Ombredanne , Arnd Bergmann , Luc Van Oostenryck , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. The file itself smaller than the size passed through bootparam. So, when decomression is finished (successfully!) we still have a garbarge in the memory which is not related to archive. Message per se is okay to have, though I consider this non-fatal. -- With Best Regards, Andy Shevchenko