|
|
1d9674 |
From 6c1bf2a029be0615089f55d815fdb78f6e06e06a Mon Sep 17 00:00:00 2001
|
|
|
1d9674 |
From: Petr Tesarik <ptesarik@suse.com>
|
|
|
1d9674 |
Date: Fri, 19 Jan 2018 20:46:17 +0900
|
|
|
1d9674 |
Subject: [PATCH 2/2] [PATCH 2/2] Fix physical-to-virtual conversion in
|
|
|
1d9674 |
exclude_segment()
|
|
|
1d9674 |
|
|
|
1d9674 |
With kaslr enabled, PAGE_OFFSET may no longer be aligned to allow
|
|
|
1d9674 |
calculation using bitwise OR. My fix follows the same idea as
|
|
|
1d9674 |
Baoquan's commit 4c53423b995463067fbbd394e724b4d1d6ea3d62 for
|
|
|
1d9674 |
set_kcore_vmcoreinfo, i.e. use arithmetic addition instead.
|
|
|
1d9674 |
|
|
|
1d9674 |
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
|
|
1d9674 |
Tested-by: Bhupesh Sharma <bhsharma@redhat.com>
|
|
|
1d9674 |
---
|
|
|
1d9674 |
elf_info.c | 4 ++--
|
|
|
1d9674 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
1d9674 |
|
|
|
1d9674 |
diff --git a/makedumpfile-1.6.2/elf_info.c b/makedumpfile-1.6.2/elf_info.c
|
|
|
1d9674 |
index 1eaddd968826..711601a170c7 100644
|
|
|
1d9674 |
--- a/makedumpfile-1.6.2/elf_info.c
|
|
|
1d9674 |
+++ b/makedumpfile-1.6.2/elf_info.c
|
|
|
1d9674 |
@@ -810,8 +810,8 @@ static int exclude_segment(struct pt_load_segment **pt_loads,
|
|
|
1d9674 |
int i, j, tidx = -1;
|
|
|
1d9674 |
unsigned long long vstart, vend, kvstart, kvend;
|
|
|
1d9674 |
struct pt_load_segment temp_seg = {0};
|
|
|
1d9674 |
- kvstart = (ulong)start | PAGE_OFFSET;
|
|
|
1d9674 |
- kvend = (ulong)end | PAGE_OFFSET;
|
|
|
1d9674 |
+ kvstart = (ulong)start + PAGE_OFFSET;
|
|
|
1d9674 |
+ kvend = (ulong)end + PAGE_OFFSET;
|
|
|
1d9674 |
unsigned long size;
|
|
|
1d9674 |
|
|
|
1d9674 |
for (i = 0; i < (*num_pt_loads); i++) {
|
|
|
1d9674 |
--
|
|
|
1d9674 |
2.7.4
|
|
|
1d9674 |
|