From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Thiago Jung Bauermann <bauerman@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>,
Thiago Jung Bauermann <bauerman@linux.ibm.com>,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
Mimi Zohar <zohar@linux.ibm.com>
Subject: Re: [PATCH] powerpc: Fix loading of kernel + initramfs with kexec_file_load()
Date: Sat, 25 May 2019 10:54:49 +1000 (AEST) [thread overview]
Message-ID: <459lBd53mCz9sBr@ozlabs.org> (raw)
In-Reply-To: <20190522220158.18479-1-bauerman@linux.ibm.com>
On Wed, 2019-05-22 at 22:01:58 UTC, Thiago Jung Bauermann wrote:
> Commit b6664ba42f14 ("s390, kexec_file: drop arch_kexec_mem_walk()")
> changed kexec_add_buffer() to skip searching for a memory location if
> kexec_buf.mem is already set, and use the address that is there.
>
> In powerpc code we reuse a kexec_buf variable for loading both the kernel
> and the initramfs by resetting some of the fields between those uses, but
> not mem. This causes kexec_add_buffer() to try to load the kernel at the
> same address where initramfs will be loaded, which is naturally rejected:
>
> # kexec -s -l --initrd initramfs vmlinuz
> kexec_file_load failed: Invalid argument
>
> Setting the mem field before every call to kexec_add_buffer() fixes this
> regression.
>
> Fixes: b6664ba42f14 ("s390, kexec_file: drop arch_kexec_mem_walk()")
> Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
> Reviewed-by: Dave Young <dyoung@redhat.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/8b909e3548706cbebc0a676067b81aad
cheers
next prev parent reply other threads:[~2019-05-25 0:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 22:01 [PATCH] powerpc: Fix loading of kernel + initramfs with kexec_file_load() Thiago Jung Bauermann
2019-05-23 3:23 ` Dave Young
2019-05-23 4:43 ` Thiago Jung Bauermann
2019-05-25 0:54 ` Michael Ellerman [this message]
2019-05-27 20:14 ` Thiago Jung Bauermann
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=459lBd53mCz9sBr@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=bauerman@linux.ibm.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=takahiro.akashi@linaro.org \
--cc=zohar@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).