Skip to content

Fix refiltering when kaslr enabled

Pratyush Anand kexec 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 4 repliesIn review
  2. v32 patches 4 repliesSuperseded
  3. v22 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches13 repliesSuperseded

Changes in v4 from the cover letter

- Removed info->kaslr_offset write to VMCOREINFO

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2makedumpfile: add runtime kaslr offset if it existsarch/x86_64.c erase_info.c makedumpfile.c +1 more+99 -03 replies
2/2x86_64: calculate page_offset in case of re-filtering/sadump/virsh dumparch/x86_64.c+29 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [Makedumpfile PATCH v4 0/2] Fix refiltering when kaslr enabled

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(-)
Signature · 7 lines
2.9.3


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec