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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
'/proc/kcore'.

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@xxxxxxxxxx>
Cc: Kazuhito Hagio <k-hagio@xxxxxxxxxxxxx>

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

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

-- 
2.7.4


_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux