Skip to content

Protect crashkernel against BSS overlap

Bernhard Walle kexec linux-ia64 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Add BSS to resource treearch/ia64/kernel/efi.c arch/ia64/kernel/setup.c arch/x86/kernel/e820_32.c +5 more+48 -1011 replies
2/3Introduce BOOTMEM_EXCLUSIVEarch/x86/kernel/mpparse_32.c arch/x86/kernel/setup_32.c arch/x86/kernel/setup_64.c +2 more+48 -170 replies
3/3Use BOOTMEM_EXCLUSIVE on x86arch/x86/kernel/setup_32.c arch/x86/kernel/setup_64.c+39 -240 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] Protect crashkernel against BSS overlap

I observed the problem that even when you choose the default 16M as crashkernel base address and the kernel is very big, the reserved area may overlap with the kernel BSS. Currently, this is not checked at runtime, so the kernel just crashes when you load the panic kernel in the sys_kexec call.

This three patches check this at runtime. The patches are against current git, but with the patches

extended-crashkernel-command-line.patch extended-crashkernel-command-line-update.patch extended-crashkernel-command-line-comment-fix.patch extended-crashkernel-command-line-improve-error-handling-in-parse_crashkernel_mem.patch use-extended-crashkernel-command-line-on-i386.patch use-extended-crashkernel-command-line-on-i386-update.patch use-extended-crashkernel-command-line-on-x86_64.patch use-extended-crashkernel-command-line-on-x86_64-update.patch use-extended-crashkernel-command-line-on-ia64.patch use-extended-crashkernel-command-line-on-ia64-fix.patch use-extended-crashkernel-command-line-on-ia64-update.patch use-extended-crashkernel-command-line-on-ppc64.patch use-extended-crashkernel-command-line-on-ppc64-update.patch use-extended-crashkernel-command-line-on-sh.patch use-extended-crashkernel-command-line-on-sh-update.patch

from -mm tree applied since they are marked to be merged in 2.6.24.

I know that the implementation of both patches is only x86 (i386 and x86-64), but if you agree that it's the way to go, I'll modify the patch for all architectures.

Changes compared to last submit:

1) use BOOTMEM_DEFAULT instead of 0 to improve code readability (suggested by Dave Hansen <[email protected]>)

2) unreserve memory that got reserved until we detect a duplicate reservation (discovered by Vivek Goyal <[email protected]>)

3) fix IA64 (didn't compile)