All of lore.kernel.org
 help / color / mirror / Atom feed
* [Makedumpfile PATCH v3 0/2] Fix refiltering when kaslr enabled
@ 2017-05-25  1:50 Pratyush Anand
  2017-05-25  1:50 ` [Makedumpfile PATCH v3 1/2] makedumpfile: add runtime kaslr offset if it exists Pratyush Anand
  2017-05-25  1:50 ` [Makedumpfile PATCH v3 2/2] x86_64: calculate page_offset in case of re-filtering/sadump/virsh dump Pratyush Anand
  0 siblings, 2 replies; 7+ messages in thread
From: Pratyush Anand @ 2017-05-25  1:50 UTC (permalink / raw)
  To: ats-kumagai; +Cc: Pratyush Anand, bhe, kexec, xlpang, d.hatayama, dyoung

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.


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 | 53 ++++++++++++++++++++++++++++++++++++++++++
 makedumpfile.h | 16 +++++++++++++
 4 files changed, 135 insertions(+), 7 deletions(-)

-- 
2.9.3


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-26  2:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-25  1:50 [Makedumpfile PATCH v3 0/2] Fix refiltering when kaslr enabled Pratyush Anand
2017-05-25  1:50 ` [Makedumpfile PATCH v3 1/2] makedumpfile: add runtime kaslr offset if it exists Pratyush Anand
2017-05-25  3:03   ` Atsushi Kumagai
2017-05-25  5:30     ` Pratyush Anand
2017-05-26  1:47       ` Atsushi Kumagai
2017-05-26  2:49         ` Pratyush Anand
2017-05-25  1:50 ` [Makedumpfile PATCH v3 2/2] x86_64: calculate page_offset in case of re-filtering/sadump/virsh dump Pratyush Anand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.