crash_core, vmcoreinfo: append 'SECTION_SIZE_BITS' to vmcoreinfo

As mentioned in kernel commit 1d50e5d0c505 ("crash_core, vmcoreinfo:
Append 'MAX_PHYSMEM_BITS' to vmcoreinfo"), SECTION_SIZE_BITS in the


Besides SECTIONS_SHIFT, SECTION_SIZE_BITS is also used to calculate
PAGES_PER_SECTION in makedumpfile just like kernel.

Unfortunately, this arch-dependent macro SECTION_SIZE_BITS changes, e.g.
recently in kernel commit f0b13ee23241 ("arm64/sparsemem: reduce
SECTION_SIZE_BITS").  But user space wants a stable interface to get
this info.  Such info is impossible to be deduced from a crashdump
vmcore.  Hence append SECTION_SIZE_BITS to vmcoreinfo.

Signed-off-by: Pingfan Liu <>
Acked-by: Baoquan He <>
Cc: Bhupesh Sharma <>
Cc: Kazuhito Hagio <>
Cc: Dave Young <>
Cc: Boris Petkov <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Cc: James Morse <>
Cc: Mark Rutland <>
Cc: Will Deacon <>
Cc: Catalin Marinas <>
Cc: Michael Ellerman <>
Cc: Paul Mackerras <>
Cc: Benjamin Herrenschmidt <>
Cc: Dave Anderson <>
Cc: <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
1 file changed