Skip to content

crash: Restore 1M crashkernel offsets on x86 and report misaligned ones

Chris Down kexec linux-doc lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/crash: Reserve crashkernel=size@offset at 1M-aligned offsets againarch/x86/include/asm/crash_reserve.h include/linux/crash_reserve.h kernel/crash_reserve.c+8 -10 replies
2/3crash: Don't report a misaligned crashkernel offset as memory in usekernel/crash_reserve.c+5 -00 replies
3/3Documentation: kdump: Mention that the crashkernel offset must be alignedDocumentation/admin-guide/kdump/kdump.rst Documentation/admin-guide/kernel-parameters.txt+13 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] crash: Restore 1M crashkernel offsets on x86 and report misaligned ones

Since v6.7, crashkernel=size@offset on x86 only reserves anything when offset is a multiple of 16M, and the kernel just says that the memory is in use otherwise. Before that, any 1M-aligned offset worked. The result is that unfortunately, some existing crashkernel configs stopped working. Of course, they are in the minority, since usually most sensible people would set it to powers of two above 16M... but anyway.

Patch 1 fixes that by asking for 1M alignment again for an explicit offset on x86. This is the one that probably should go to stable, given this is a somewhat unintended behaviour change.

Patch 2 reports misalignment, since previously we just write that it failed, with no docs or message to really help the user understand why. The new message gives the alignment the offset has to meet, instead of claiming that the memory is in use.

Patch 3 documents the alignment. kdump.rst currently says that a misaligned offset only wastes the memory below the alignment point, but on x86, arm64, riscv and loongarch nothing is reserved at all.

Patches 2 and 3 build on patch 1, but don't need to go to stable.

Chris Down (3):
x86/crash: Reserve crashkernel=size@offset at 1M-aligned offsets again
crash: Don't report a misaligned crashkernel offset as memory in use
Documentation: kdump: Mention that the crashkernel offset must be
aligned

 Documentation/admin-guide/kdump/kdump.rst       | 15 ++++++++++-----
 Documentation/admin-guide/kernel-parameters.txt |  4 +++-
 arch/x86/include/asm/crash_reserve.h            |  2 ++
 include/linux/crash_reserve.h                   |  3 +++
 kernel/crash_reserve.c                          |  9 ++++++++-
 5 files changed, 26 insertions(+), 7 deletions(-)

base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106

Signature · 1 line
2.56.1