LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: David Engraf <david.engraf@sysgo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND] initramfs: cleanup incomplete rootfs
Date: Fri, 15 Feb 2019 22:13:05 +0200	[thread overview]
Message-ID: <CAHp75VcAqi-P6LF34XhYrwXH+Ejt_ZCYPMUG8VsTMD8q6w-AdA@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Vf0_1=TLJ9px08yrzf3RjgfdFQYd06erkhOKhy07Gb=GQ@mail.gmail.com>

On Tue, Feb 12, 2019 at 3:50 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, Feb 12, 2019 at 2:12 PM David Engraf <david.engraf@sysgo.com> wrote:
> > On 12.02.19 at 11:43, Andy Shevchenko wrote:
> > > On Mon, Feb 11, 2019 at 2:40 PM David Engraf <david.engraf@sysgo.com> 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

  reply	other threads:[~2019-02-15 20:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-22 13:40 [PATCH] " David Engraf
2018-10-30 15:18 ` [PATCH RESEND] " David Engraf
2019-02-08 19:45   ` Andy Shevchenko
2019-02-08 22:08     ` Andrew Morton
2019-02-09 10:35       ` Andy Shevchenko
2019-02-11  7:56         ` David Engraf
2019-02-11  8:49           ` David Engraf
2019-02-11 11:40             ` Andy Shevchenko
2019-02-11 12:40               ` David Engraf
2019-02-12 10:43                 ` Andy Shevchenko
2019-02-12 12:12                   ` David Engraf
2019-02-12 13:50                     ` Andy Shevchenko
2019-02-15 20:13                       ` Andy Shevchenko [this message]
2019-02-12  0:56         ` Andrew Morton
2019-02-12  8:04           ` David Engraf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75VcAqi-P6LF34XhYrwXH+Ejt_ZCYPMUG8VsTMD8q6w-AdA@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=david.engraf@sysgo.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=pombredanne@nexb.com \
    --subject='Re: [PATCH RESEND] initramfs: cleanup incomplete rootfs' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).