[PATCH v5 0/2] x86/crash: size the elfcorehdr reservation with NR_CPUS

Ionut Nechita (Wind River) ionut.nechita at windriver.com
Tue Sep 1 00:10:39 PDT 2026


From: Ionut Nechita <ionut.nechita at windriver.com>

Hi,

The x86 crash code sizes the elfcorehdr reservation with
CONFIG_NR_CPUS_DEFAULT, which is a Kconfig default and not an upper
bound.  The header itself carries one phdr per possible CPU, so the
reservation is too small whenever NR_CPUS exceeds NR_CPUS_DEFAULT.

Patch 1 sizes it with CONFIG_NR_CPUS instead.  Patch 2 fixes the two
comments that still name NR_CPUS_DEFAULT.

Based on linux-next (next-20260831, base-commit 89c07d98716a1).

Changes since v4:
- Bradley Morgan's tags now use his new address, brads at mainlining.org,
  as he asked on the v4 thread.  His change of address was announced
  from the old one in [1] and he says the mailmap patch is already out.
- Rebased from next-20260826 onto next-20260831.  No code changes; the
  diff is byte-identical to v2, v3 and v4.

[1] https://lore.kernel.org/all/EE579805-42F2-4C58-B752-F28779EEB717@grrlz.net/

v1: https://lore.kernel.org/lkml/20260812170433.533845-1-ionut.nechita@windriver.com/
v2: https://lore.kernel.org/lkml/20260825075043.42041-1-ionut.nechita@windriver.com/
v3: https://lore.kernel.org/lkml/20260826073527.21487-1-ionut.nechita@windriver.com/
v4: https://lore.kernel.org/lkml/20260827070822.12651-1-ionut.nechita@windriver.com/

Ionut Nechita (2):
  x86/crash: reserve elfcorehdr for CONFIG_NR_CPUS, not
    CONFIG_NR_CPUS_DEFAULT
  crash: update stale NR_CPUS_DEFAULT references in elfcorehdr sizing
    docs

 arch/x86/kernel/crash.c | 6 +++---
 kernel/Kconfig.kexec    | 2 +-
 kernel/crash_core.c     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


base-commit: 89c07d98716a13454ec3fd9f97689e812cc71bd4
--
2.55.0




More information about the kexec mailing list