Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Makedumpfile PATCH v2 0/2] Fix refiltering when kaslr enabled
@ 2017-05-12  2:41 Pratyush Anand
  2017-05-12  2:41 ` [Makedumpfile PATCH v2 1/2] makedumpfile: add runtime kaslr offset if it exists Pratyush Anand
  2017-05-12  2:41 ` [Makedumpfile PATCH v2 2/2] x86_64: calculate page_offset in case of re-filtering Pratyush Anand
  0 siblings, 2 replies; 3+ messages in thread
From: Pratyush Anand @ 2017-05-12  2:41 UTC (permalink / raw)
  To: ats-kumagai; +Cc: Pratyush Anand, dyoung, kexec, bhe, xpang


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.

Since, I am not an expert of x86, and these patches touch x86 part of
makedumpfile, therefore I have CCed x86 experts. Please, provide your
review comment and let me know if you think there could have been a better
way to resolve this issue.

thanks

~Pratyush

v1->v2:
 - reading KERNELOFFSET from vmcoreinfo now instead of calculating it from
   _stext

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

 arch/x86_64.c  | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 erase_info.c   |  1 +
 makedumpfile.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 makedumpfile.h | 16 ++++++++++++++++
 4 files changed, 124 insertions(+), 2 deletions(-)

-- 
2.9.3


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

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-12  2:41 [Makedumpfile PATCH v2 0/2] Fix refiltering when kaslr enabled Pratyush Anand
2017-05-12  2:41 ` [Makedumpfile PATCH v2 1/2] makedumpfile: add runtime kaslr offset if it exists Pratyush Anand
2017-05-12  2:41 ` [Makedumpfile PATCH v2 2/2] x86_64: calculate page_offset in case of re-filtering Pratyush Anand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox