The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/2] kho: fixes for kho_init() failures
@ 2026-11-28  9:21 Chris Down
  2026-11-28  9:21 ` [PATCH v2 1/2] kho: don't release incoming bootmem areas when kho_init() fails Chris Down
  2026-11-28  9:21 ` [PATCH v2 2/2] kho: don't fail kho_init() when debugfs is disabled Chris Down
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Down @ 2026-11-28  9:21 UTC (permalink / raw)
  To: rppt, pasha.tatashin, pratyush
  Cc: graf, kexec, linux-mm, linux-kernel, kernel-team

When kho_init() fails on a KHO boot, its error path frees the bootmem
areas that were inherited from the previous kernel, even though the
running kernel was loaded into them and is still using them. The new
kernel then oopses in kho_init() and panics.

The easiest way to get there turned out to be debugfs=off. With
CONFIG_KEXEC_HANDOVER_DEBUGFS=y, kho_init() fails when it can't create
its debugfs entries, so a KHO kexec into a kernel with debugfs disabled
is enough to hit the panic. That's a bug in its own right, because it
means KHO and LUO can't be used at all on a kernel that has debugfs
disabled, although nothing in KHO needs debugfs any more.

This series stops the error path from freeing bootmem areas that it
didn't reserve, and stops kho_init() from failing when debugfs is
disabled.

v2:

- Use is_kho_boot() instead of checking fdt (Mike)
- Say who reserves the bootmem areas on each kind of boot (Mike)
- Describe how to trigger it and add the oops (Mike)
- Add a patch so that kho_init() doesn't fail when debugfs is disabled
- Rebase onto liveupdate/fixes

v1: https://lore.kernel.org/r/au_vQhHAcJbkryXN@chrisdown.name

Chris Down (2):
  kho: don't release incoming bootmem areas when kho_init() fails
  kho: don't fail kho_init() when debugfs is disabled

 kernel/liveupdate/kexec_handover.c          | 19 ++++++++-----------
 kernel/liveupdate/kexec_handover_debugfs.c  | 19 +++++++++++--------
 kernel/liveupdate/kexec_handover_internal.h |  8 ++++----
 3 files changed, 23 insertions(+), 23 deletions(-)


base-commit: fa1c0f103fd68558613d3df76e222463c6e4fc37
-- 
2.56.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-28  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-28  9:21 [PATCH v2 0/2] kho: fixes for kho_init() failures Chris Down
2026-11-28  9:21 ` [PATCH v2 1/2] kho: don't release incoming bootmem areas when kho_init() fails Chris Down
2026-11-28  9:21 ` [PATCH v2 2/2] kho: don't fail kho_init() when debugfs is disabled Chris Down

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox