Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] arm64: crash: Add crash hotplug support
@ 2026-07-29  3:12 Jinjie Ruan
  2026-07-29  3:12 ` [PATCH v2 1/5] kexec: Extract kexec_free_segment_cma() from kimage_free_cma() Jinjie Ruan
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Jinjie Ruan @ 2026-07-29  3:12 UTC (permalink / raw)
  To: catalin.marinas, will, akpm, baoquan.he, rppt, pasha.tatashin,
	pratyush, thuth, mark.rutland, jic23, james.morse, ardb, leitao,
	yeoreum.yun, sourabhjain, robh, kees, coxu, makb, piliu, graf,
	ebiggers, jbouron, bgwin, linux-arm-kernel, linux-kernel, kexec
  Cc: ruanjinjie

When CPU or memory hotplug events occur, the elfcorehdr in the kdump
image becomes stale, potentially leading to incomplete crash dumps.

Currently, userspace udev rules reload the entire kdump image upon such
events, which is inefficient and leaves kdump inactive for a long time.

Commit 247262756121 ("crash: add generic infrastructure for crash hotplug
support") introduced a kernel mechanism to update only the elfcorehdr.
This patch set implements crash hotplug support for arm64.

As Baoquan suggested, it also addresses and fixes several
pre-existing code issues and Sashiko AI review findings extracted
from the previous patch set.

The major improvements and fixes included in this series are:
- Fix several memory leaks for arm64.
- Simplify arm64 load_other_segments().
- Implement infrastructure for arm64 crash memory hotplug support.

This patch set is rebased on liveupdate/crashkernel-cma.

Link: https://lore.kernel.org/all/20260601094805.2928614-1-ruanjinjie@huawei.com/

Changes in v2:
- Split out Powerpc bugfix patch as Mike suggested.
- Use phys_to_virt() instead of __va() in update_crash_elfcorehdr().
- Convert pnum_hdr_sz() to a function.
- Only assign elfcorehdr_index after kexec_add_buffer succeeds, considering
  crash_handle_hotplug_event() already performs validity check on
  elfcorehdr_index:
  - We can safely remove the check for CPU hotplug
    in arch_crash_handle_hotplug_event().
  - The elfcorehdr_index's segment mem will be valid in
    update_crash_elfcorehdr(), so we can safely remove the NULL check.
- Simplify the commit message.
- v1: https://lore.kernel.org/all/20260723131242.1537633-1-ruanjinjie@huawei.com/#t

Jinjie Ruan (5):
  kexec: Extract kexec_free_segment_cma() from kimage_free_cma()
  arm64: kexec_file: Fix CMA page leaks in segment placement retry loops
  arm64: kexec_file: Fix image->elf_headers memory leak in retry loop
  arm64: kexec_file: Simplify load_other_segments()
  arm64: crash: Add crash hotplug support

 arch/arm64/Kconfig                     |   3 +
 arch/arm64/include/asm/kexec.h         |  16 +++
 arch/arm64/kernel/Makefile             |   2 +-
 arch/arm64/kernel/crash.c              | 143 +++++++++++++++++++++++++
 arch/arm64/kernel/kexec_image.c        |   1 +
 arch/arm64/kernel/machine_kexec_file.c |  78 +++++++-------
 include/linux/kexec.h                  |   2 +
 kernel/kexec_core.c                    |  25 +++--
 8 files changed, 216 insertions(+), 54 deletions(-)
 create mode 100644 arch/arm64/kernel/crash.c

-- 
2.34.1



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

end of thread, other threads:[~2026-08-13 16:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29  3:12 [PATCH v2 0/5] arm64: crash: Add crash hotplug support Jinjie Ruan
2026-07-29  3:12 ` [PATCH v2 1/5] kexec: Extract kexec_free_segment_cma() from kimage_free_cma() Jinjie Ruan
2026-07-29  3:12 ` [PATCH v2 2/5] arm64: kexec_file: Fix CMA page leaks in segment placement retry loops Jinjie Ruan
2026-07-29  3:12 ` [PATCH v2 3/5] arm64: kexec_file: Fix image->elf_headers memory leak in retry loop Jinjie Ruan
2026-07-29  3:12 ` [PATCH v2 4/5] arm64: kexec_file: Simplify load_other_segments() Jinjie Ruan
2026-07-29  3:12 ` [PATCH v2 5/5] arm64: crash: Add crash hotplug support Jinjie Ruan
2026-08-13 16:05   ` Catalin Marinas
2026-08-11 13:05 ` [PATCH v2 0/5] " Jinjie Ruan
2026-08-13 14:40 ` Catalin Marinas

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