mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>, Kees Cook <keescook@chromium.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [BUGFIX PATCH 1/1] bootconfig: Fix to remove bootconfig data from initrd while boot
Date: Fri, 24 Apr 2020 19:58:33 -0400	[thread overview]
Message-ID: <20200424195833.1487a1a0@oasis.local.home> (raw)
In-Reply-To: <158774605193.7423.573803007569761807.stgit@devnote2>

On Sat, 25 Apr 2020 01:34:12 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> If there is a bootconfig data in the tail of initrd/initramfs,
> initrd image sanity check caused an error while decompression
> stage as follows.
> 
> [    0.883882] Unpacking initramfs...
> [    2.696429] Initramfs unpacking failed: invalid magic at start of compressed archive
> 
> This error will be ignored if CONFIG_BLK_DEV_RAM=n,
> but CONFIG_BLK_DEV_RAM=y the kernel failed to mount rootfs
> and causes a panic.
> 
> To fix this issue, shrink down the initrd_end for removing
> tailing bootconfig data while boot the kernel.
> 
> Fixes: 7684b8582c24 ("bootconfig: Load boot config from the tail of initrd")
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: stable@vger.kernel.org
> ---
>  init/main.c |   62 +++++++++++++++++++++++++++++++++++++++++++----------------
>  1 file changed, 45 insertions(+), 17 deletions(-)
> 
> 

A build with

 $ make allnoconfig

Produces this:

  MODPOST vmlinux.o
  MODINFO modules.builtin.modinfo
  GEN     modules.builtin
  LD      vmlinux
ld: init/main.o: in function `start_kernel':
main.c:(.init.text+0x37f): undefined reference to `initrd_end'
ld: main.c:(.init.text+0x3a7): undefined reference to `initrd_start'
ld: main.c:(.init.text+0x3ae): undefined reference to `initrd_end'
make[1]: *** [/work/git/linux-trace.git/Makefile:1106: vmlinux] Error 1

-- Steve

  parent reply	other threads:[~2020-04-24 23:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 16:34 [BUGFIX PATCH 0/1] bootconfig: Fix wrong initramfs/initrd error with bootconfig Masami Hiramatsu
2020-04-24 16:34 ` [BUGFIX PATCH 1/1] bootconfig: Fix to remove bootconfig data from initrd while boot Masami Hiramatsu
2020-04-24 23:00   ` Steven Rostedt
2020-04-24 23:58   ` Steven Rostedt [this message]
2020-04-26  6:53     ` Masami Hiramatsu
2020-04-26  6:53     ` [BUGFIX PATCH v2 " Masami Hiramatsu

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=20200424195833.1487a1a0@oasis.local.home \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®