kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Pratyush Anand <panand@redhat.com>
To: ats-kumagai@wm.jp.nec.com
Cc: Pratyush Anand <panand@redhat.com>,
	bhe@redhat.com, kexec@lists.infradead.org, xlpang@redhat.com,
	d.hatayama@jp.fujitsu.com, dyoung@redhat.com
Subject: [Makedumpfile PATCH v4 0/2] Fix refiltering when kaslr enabled
Date: Fri, 26 May 2017 08:36:38 +0530	[thread overview]
Message-ID: <cover.1495767738.git.panand@redhat.com> (raw)

Hi All,

We came across another failure in makedumpfile when kaslr is enabled. This
failure occurs when we try re-filtering. We try to erase some symbol from a
dumpfile which was copied/compressed from /proc/vmcore using makedumpfile.

We have very limited symbol information in vmcoreinfo. So symbols to be
erased may not be available in vmcoreinfo and we look for it in vmlinux.
However,  symbol address from vmlinux is a static address which differs
from run time address with KASLR_OFFSET. Therefore, reading any "virtual
address of vmlinux" from vmcore is not possible. 

These patches finds runtime  KASLR offset and then calculates run time
address of symbols read from vmlinux.

Hatayama Daisuke also found some issue [1] when he was working with a
sadump and virsh dump of a none kaslr kernel. Patch 2/2 of this series has
been improved to take care of those issues as well.

[1]http://lists.infradead.org/pipermail/kexec/2017-May/018833.html

Thanks

~Pratyush

v1->v2:
 - reading KERNELOFFSET from vmcoreinfo now instead of calculating it from
   _stext
v2->v3:
 - Fixed initialization of info->file_vmcoreinfo
 - Improved page_offset calculation logic to take care of different dump
   scenarios.
v3->v4:
 - Removed info->kaslr_offset write to VMCOREINFO



Pratyush Anand (2):
  makedumpfile: add runtime kaslr offset if it exists
  x86_64: calculate page_offset in case of re-filtering/sadump/virsh
    dump

 arch/x86_64.c  | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
 erase_info.c   |  1 +
 makedumpfile.c | 46 +++++++++++++++++++++++++++++++++++++
 makedumpfile.h | 16 +++++++++++++
 4 files changed, 128 insertions(+), 7 deletions(-)

-- 
2.9.3


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

             reply	other threads:[~2017-05-26  3:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26  3:06 Pratyush Anand [this message]
2017-05-26  3:06 ` [Makedumpfile PATCH v4 1/2] makedumpfile: add runtime kaslr offset if it exists Pratyush Anand
2017-06-08  6:36   ` Pratyush Anand
2017-06-08  7:59     ` Atsushi Kumagai
2017-06-08  8:10       ` Pratyush Anand
2017-05-26  3:06 ` [Makedumpfile PATCH v4 2/2] x86_64: calculate page_offset in case of re-filtering/sadump/virsh dump Pratyush Anand
2017-05-26  7:45 ` [Makedumpfile PATCH v4 0/2] Fix refiltering when kaslr enabled Atsushi Kumagai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1495767738.git.panand@redhat.com \
    --to=panand@redhat.com \
    --cc=ats-kumagai@wm.jp.nec.com \
    --cc=bhe@redhat.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=xlpang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).