Commit 1ea989bf authored by Kazuhito Hagio's avatar Kazuhito Hagio
Browse files

[PATCH] x86_64: fix failure of getting kcore vmcoreinfo on kernel 4.19



* Required for kernel 4.19

kernel commit 6855dc41b246 ("x86: Add entry trampolines to kcore")
added program headers for PTI entry trampoline pages to /proc/kcore.
(Later commit bf904d2762ee ("x86/pti/64: Remove the SYSCALL64 entry
trampoline") removed them.)

This caused the failure of makedumpfile --mem-usage due to wrong
calculation of info->page_offset.

  # makedumpfile --mem-usage /proc/kcore
  [...]
  set_kcore_vmcoreinfo: Can't get the offset of VMCOREINFO(/proc/kcore). Success

  makedumpfile Failed.

Since program headers for direct maps are located after the same,
with this patch, we select the last valid one to set page_offset.

Also, this patch adds a few debug messages for better debugging.

Signed-off-by: default avatarKazuhito Hagio <k-hagio@ab.jp.nec.com>
parent 53cf7834
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment