From: Mike Rapoport <rppt@kernel.org>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: sourabhjain@linux.ibm.com, jbouron@amazon.com,
akpm@linux-foundation.org, linux-mm@kvack.org, bhe@redhat.com,
linux-kernel@vger.kernel.org, dan.carpenter@linaro.org,
rafael.j.wysocki@intel.com, piliu@redhat.com,
kexec@lists.infradead.org, pratyush@kernel.org, graf@amazon.com,
changyuanl@google.com, mario.limonciello@amd.com
Subject: Re: [PATCH v2 1/3] kho: skip KHO data for context-preserving kexec
Date: Mon, 11 May 2026 13:38:08 +0300 [thread overview]
Message-ID: <agGxkHPx7W7P5AUS@kernel.org> (raw)
In-Reply-To: <20260506182039.2623553-6-pasha.tatashin@soleen.com>
On Wed, May 06, 2026 at 02:20:41PM -0400, Pasha Tatashin wrote:
> A preserve_context kexec returns to the current kernel, which means the
> 2nd kernel does not use KHO data (and their memory spaces don't
> overlap). Passing KHO data to the 2nd kernel via setup_data or
> devicetree is unnecessary.
>
> Add a check in kho_fill_kimage() and return early if preserve_context is
> set, to avoid passing KHO state during context-preserving kexecs.
>
> Fixes: 3bdecc3c93f9 ("kexec: add KHO support to kexec file loads")
> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> ---
> kernel/liveupdate/kexec_handover.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
> index 4fde8325c49f..2eec2a169c83 100644
> --- a/kernel/liveupdate/kexec_handover.c
> +++ b/kernel/liveupdate/kexec_handover.c
> @@ -1702,7 +1702,8 @@ int kho_fill_kimage(struct kimage *image)
> int err = 0;
> struct kexec_buf scratch;
>
> - if (!kho_enable || image->type == KEXEC_TYPE_CRASH)
> + if (!kho_enable || image->type == KEXEC_TYPE_CRASH ||
> + image->preserve_context)
> return 0;
Sashiko says it's unnecessary:
https://sashiko.dev/#/patchset/20260506182039.2623553-5-pasha.tatashin@soleen.com
I tend to agree :)
> image->kho.fdt = virt_to_phys(kho_out.fdt);
> --
> 2.54.0.545.g6539524ca2-goog
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-05-11 10:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 18:20 [PATCH v2 0/3] liveupdate: serialization safety and race fixes Pasha Tatashin
2026-05-06 18:20 ` [PATCH v2 1/3] kho: skip KHO data for context-preserving kexec Pasha Tatashin
2026-05-11 10:38 ` Mike Rapoport [this message]
2026-05-11 11:16 ` Pratyush Yadav
2026-05-11 13:11 ` Pasha Tatashin
2026-05-11 11:00 ` Pratyush Yadav
2026-05-06 18:20 ` [PATCH v2 2/3] liveupdate: skip serialization " Pasha Tatashin
2026-05-06 18:20 ` [PATCH v2 3/3] liveupdate: block outgoing session mutations Pasha Tatashin
2026-05-11 11:03 ` Pratyush Yadav
2026-05-11 13:44 ` Pasha Tatashin
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=agGxkHPx7W7P5AUS@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=changyuanl@google.com \
--cc=dan.carpenter@linaro.org \
--cc=graf@amazon.com \
--cc=jbouron@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mario.limonciello@amd.com \
--cc=pasha.tatashin@soleen.com \
--cc=piliu@redhat.com \
--cc=pratyush@kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=sourabhjain@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