[PATCH v2 0/2] makedumpfile: Allow 'info->page_offset' calc via VMCOREINFO in '/proc/kcore'

Bhupesh Sharma bhsharma at redhat.com
Mon Oct 29 00:50:29 PDT 2018

This two patch series, tries to introduce an architecture independent
method to calculate the 'info->page_offset' value for x86_64
and arm64 architectures, by reading the VMCOREINFO note in

Since linux kernel commit 23c85094fe1895caefdd
["proc/kcore: add vmcoreinfo note to /proc/kcore"]), '/proc/kcore'
contains a new PT_NOTE which carries the VMCOREINFO information.

If the same is available, one can use it in user-land to
retrieve machine specific symbols or strings being appended to the
vmcoreinfo even for live-debugging of the primary kernel as a
standard interface exposed by kernel for sharing machine specific
details with the user-land.

I understand that there might be some reservations about exporting
such machine-specific details in the vmcoreinfo, but to unify
the implementations across user-land and archs, perhaps this would be
good starting point to start a discussion.

Here are brief details of the patches in this patchset:
- PATCH 1/2: Calculates 'info->page_offset' for arm64 arch via
  vmcoreinfo note inside '/proc/kcore'.
- PATCH 2/2: Calculates 'info->page_offset' for x86_64 arch via
  vmcoreinfo note inside '/proc/kcore', thus fixing a makedumpfile
  '--mem-usage' breakage with latest kernels on x86_64.

Cc: Baoquan He <bhe at redhat.com>
Cc: Kazuhito Hagio <k-hagio at ab.jp.nec.com>

Bhupesh Sharma (2):
  makedumpfile/arm64: Use VMCOREINFO inside '/proc/kcore' (if available)
  makedumpfile/x86_64: Add 'page_offset_base' reading capability from

 arch/arm64.c   | 114 +++++++++++++++++++++++++++++++++++++++++++--------------
 arch/x86_64.c  |  17 +++++++++
 makedumpfile.c |  69 +++++++++++++++++++++++++++++++---
 makedumpfile.h |   3 +-
 4 files changed, 169 insertions(+), 34 deletions(-)


More information about the kexec mailing list