Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp258328imj; Fri, 15 Feb 2019 23:14:06 -0800 (PST) X-Google-Smtp-Source: AHgI3IaDjpBqDUZnORf8EcXDYHccCiRF01fqUQCDqCzlmVSesUVmCB7E9DtRStRsoIFHJrQ2qDWO X-Received: by 2002:a63:d5f:: with SMTP id 31mr9002265pgn.274.1550301246806; Fri, 15 Feb 2019 23:14:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550301246; cv=none; d=google.com; s=arc-20160816; b=hQ+mgWkyolglFv0KJvmXejE0FrEY7SnPEQWcDMnSeXJ9b9YLC+KRSQImP60CLD8dLb fH9YBQIBkJ17MgNq/7FuYC1upbzgtm54s6UcoCtB4CUbrfWjQWLuAgajI+VXdEEMeX5M 3cwYTkuj9igtQtvjEIesetxGeCsyUrovM0BOKsjBtmSSe8O6KmdGzkVPVddgUWsMKhJd OItrwROr9c/36blZH6BVgpgsXyek+GRw1DSW07JRrNfK9AK4fnn2FCd0Gv7Jn6YAPakb UxfZR1doL/66ZFh2yv0t/CqcBG6ERZGgOd6ZwhCsM08N+9/Jzr1kh8qMZZLvhd1Mo/2P a1NA== 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=PVmXqXUagzoMwzSSvfCScBloUdLgpwgEtiapdMdvKRU=; b=ymG5Ig0lZEGtOaS3L049P4W2IQuXHxbO/NH/FQdrUp7/BGRazlwXyQN3kH6mBj2W+i IOpL0QlPAA7vJoeHXNq/5tL5gRDQYYzpgKuTSUQ1zqA8YO+LWfhiMuQuA2RNc+N3TLhX 99E2jx+owvTco0fwIo1dZN59VWTwT7ZI0WERFhZEMiwe6dYJ08Qegi9LfLtCzZkZehA8 FvnMS2tqZWEa+o8ZpRBAT4AJXrXwQwBJhBRqvrTBkGb8sEovigQcYjvqajhdESbfS9Sy agu/yq4JndFdZa5CKGltbX3emkJDwq9hZ4x/GulnAz+mhm7FdzVMdomlQHF62QVTa5iQ KLZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SVTghLHn; 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 f193si7437042pgc.31.2019.02.15.23.13.51; Fri, 15 Feb 2019 23:14:06 -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=SVTghLHn; 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 S2390524AbfBOUNR (ORCPT + 99 others); Fri, 15 Feb 2019 15:13:17 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43313 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfBOUNR (ORCPT ); Fri, 15 Feb 2019 15:13:17 -0500 Received: by mail-pl1-f194.google.com with SMTP id f90so5457837plb.10 for ; Fri, 15 Feb 2019 12:13:17 -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=PVmXqXUagzoMwzSSvfCScBloUdLgpwgEtiapdMdvKRU=; b=SVTghLHniM7zRQI/Ixi0GcXvweyz+p68dpqPNkLT3LFD+AJl3B5ozptT9pOYuZH3pK h0sBOhCaAw8926/R7EvnKiNDxY964b+cCCtio43pyrK5bUuxufPvoKD9fVzclykw2fPJ Squ4m0Rct5NS0n76eNpLTJzmL2/+xVGRwyHkeZx2M/AEWm2+D9BO361JJyyeR791lPAN p/Jiwgyx1rXvXf3/Ra1Ouv7yj3EHWN7WiY/Ez8fjkkOXpTXcxp60dTepU+v4L82Tdoec q8CMQ1g/pK0jVdU+94gUNJN8EtcJQYQ8WUnMvwFDi88m0Gh/GNUnYk8F4+9QH0+wBljs A9NA== 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=PVmXqXUagzoMwzSSvfCScBloUdLgpwgEtiapdMdvKRU=; b=rrh6WcEsc7sGU2dd/Xwy0NlCtMYiwb4VEX6gfwQxFhNO5qdWo3CJwBEn9v0ZpjpI17 NDtm7NtXMj16TQwqoHSUmePcmJHlV4KPChh8HqiHBE9XbamOW2fBT9EiFmXwP7Fc8288 cslngJqnVcVK33t/3/tpSaCkILriIiMoEBHtx3XAWmzxdJkOaTXw7SyKknmP2NhALaUx PhI4qU1ychQg7d2inzSpbaJLrp5iuPoCU45NLjMr/eFcblK+J7XNJUc6Yo+BB56EHvSO L9kwlRTan3eCPE6HfiNjg2BKtyDXX8oGHwwxX60if4AVuzvBJWQgEZO1EltuMM/xiBXU SSqQ== X-Gm-Message-State: AHQUAuYzZF7v5LlkoudhMCKNoFLkj/4EQGr8usvPXRZWiwrjSQOroP91 Dw7YTFInMisFBE/Aah7/KV/zNM2whUTyb7uzguo= X-Received: by 2002:a17:902:1a2:: with SMTP id b31mr12113454plb.87.1550261596640; Fri, 15 Feb 2019 12:13:16 -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> <744e7bcb-9315-0283-67c5-c2cb2d094251@sysgo.com> <28139206-7fed-e00e-8f52-47e68655963d@sysgo.com> <84d387a3-0519-d50b-2c5d-98c10f694376@sysgo.com> In-Reply-To: From: Andy Shevchenko Date: Fri, 15 Feb 2019 22:13:05 +0200 Message-ID: Subject: Re: [PATCH RESEND] initramfs: cleanup incomplete rootfs To: David Engraf Cc: Andrew Morton , 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 Tue, Feb 12, 2019 at 3:50 PM Andy Shevchenko wrote: > On Tue, Feb 12, 2019 at 2:12 PM David Engraf wrote: > > On 12.02.19 at 11:43, Andy Shevchenko wrote: > > > On Mon, Feb 11, 2019 at 2:40 PM David Engraf wrote: > > >> On 11.02.19 at 12:40, Andy Shevchenko wrote: > > > >> Ok got it. When the memory behind the actual file size is clear (0x0) > > >> the decompression doesn't complain and just ignores the padding. Any > > >> other data will be interpreted as a new archive and thus you'll see the > > >> error message. > > > > > > Correct. > > > > > >> Is it possible for you to fill the padding after the actual file size > > >> with 0x00 ? > > > > > > Not sure. This is boot loader realm. Even if I patch U-Boot, not every > > > boot loader will guarantee this. > > > So, it's fragile to rely on data being 0x00 after actual archive. > > > > The problem is that the kernel expects another archive if there are data > > left. If these data do not contain a valid magic the kernel prints an > > error message which is correct. > > Agree. JFYI: I had tested your another patch and it prints me the following [ 20.672873] Initramfs unpacking failed: invalid magic at start of compressed archive Nevertheless, I can use the system (since revert of this patch). > > I could make this error not critical and keep the rootfs, but it's still > > an error and unexpected. > > I would rather call it a warning and continue. > > Perhaps something like > > static void warning(const char *msg) > { > ...print warning... > return without assigning return value. > } -- With Best Regards, Andy Shevchenko