VMCOREINFO_BYTES is defined as a configurable size, but multiple
code paths implicitly assume it always fits into a single page.
This series removes that assumption by allocating and mapping
vmcoreinfo based on its actual size.
Patch 1 updates vmcoreinfo allocation to use get_order(VMCOREINFO_BYTES).
Patch 2 updates crash kernel handling to correctly allocate and map
multiple pages when copying vmcoreinfo.
This makes vmcoreinfo size consistent across the kernel and avoids
future breakage if VMCOREINFO_BYTES grows.
Tested on riscv64.
(No functional change when VMCOREINFO_BYTES == PAGE_SIZE.)
Pnina Feder (2):
kernel: vmcoreinfo: allocate vmcoreinfo_data based on VMCOREINFO_BYTES
kernel/crash: handle multi-page vmcoreinfo in crash kernel copy
kernel/crash_core.c | 17 +++++++++++++----
kernel/vmcore_info.c | 6 ++++--
2 files changed, 17 insertions(+), 6 deletions(-)
--
2.43.0