Skip to content

kexec: Limit the crash memory ranges according to first kernel's memory limit.

Mahesh J Salgaonkar kexec 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Fixed few formatting and coding style issues.
- Fixed error handling path and possible buffer overflow issue in patch 1/2.
- Fixed an issue where an additional PT_LOAD section, representing zero size memory segment (with start address == memory_limit), was getting added to ELF section.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kexec: Respect memory limit while building crash memory ranges on ppc32.kexec/arch/ppc/crashdump-powerpc.c kexec/arch/ppc/crashdump-powerpc.h kexec/arch/ppc/kexec-ppc.c+63 -30 replies
2/2kexec: Respect memory limit while building crash memory ranges on ppc64kexec/arch/ppc64/crashdump-ppc64.c kexec/arch/ppc64/crashdump-ppc64.h kexec/arch/ppc64/kexec-ppc64.c+38 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchSuzuki K. Poulose
SeriesT-b
1/2T-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] kexec: Limit the crash memory ranges according to first kernel's memory limit.

So far powerpc kernel never exported memory limit information which is reflected by mem= kernel cmdline option. Hence, kexec-tools always use to build ELF header for entire system RAM generating a dump bigger than the actual memory used by the first kernel.

The following upstream kernel commits now exports memory limit information through /proc/device-tree file:
4bc77a5ed - powerpc: Export memory limit via device tree a84fcd468 - powerpc: Change memory_limit from phys_addr_t to unsigned
long long

This patch series now reads the memory limit information from device-tree file if present and limits the crash memory ranges accordingly.

Tested these patches on ppc32(ppc440) and ppc64 with a kernel patch by Suzuki.

Changes in v2:
- Fixed few formatting and coding style issues.
- Fixed error handling path and possible buffer overflow issue in patch 1/2.
- Fixed an issue where an additional PT_LOAD section, representing zero size memory segment (with start address == memory_limit), was getting added to ELF section.

---

Mahesh Salgaonkar (2):
kexec: Respect memory limit while building crash memory ranges on ppc32.
kexec: Respect memory limit while building crash memory ranges on ppc64

 kexec/arch/ppc/crashdump-powerpc.c |   14 ++++++++--
 kexec/arch/ppc/crashdump-powerpc.h |    1 +
 kexec/arch/ppc/kexec-ppc.c         |   51 ++++++++++++++++++++++++++++++++++++
 kexec/arch/ppc64/crashdump-ppc64.c |   11 +++++++-
 kexec/arch/ppc64/crashdump-ppc64.h |    1 +
 kexec/arch/ppc64/kexec-ppc64.c     |   27 +++++++++++++++++++
 6 files changed, 101 insertions(+), 4 deletions(-)
Signature · 7 lines
-Mahesh


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec