Blame kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
|
Pratyush Anand |
3d7e34e |
From 0ebcd6f3570dd66bff0930872b8bf859bdcf302a Mon Sep 17 00:00:00 2001
|
|
Pratyush Anand |
3d7e34e |
Message-Id: <0ebcd6f3570dd66bff0930872b8bf859bdcf302a.1477548646.git.panand@redhat.com>
|
|
Pratyush Anand |
3d7e34e |
From: Pratyush Anand <panand@redhat.com>
|
|
Pratyush Anand |
3d7e34e |
Date: Thu, 27 Oct 2016 11:34:33 +0530
|
|
Pratyush Anand |
3d7e34e |
Subject: [PATCH] x86_64: fix page_offset calculation
|
|
Pratyush Anand |
3d7e34e |
|
|
Pratyush Anand |
3d7e34e |
Kernel text region lies above __START_KERNEL_map, which is linearly mapped
|
|
Pratyush Anand |
3d7e34e |
however not a direct mapping. Direct mapping region lies below it instead.
|
|
Pratyush Anand |
3d7e34e |
So, page_offset can only be calculated with a region which is below
|
|
Pratyush Anand |
3d7e34e |
__START_KERNEL_map.
|
|
Pratyush Anand |
3d7e34e |
|
|
Pratyush Anand |
3d7e34e |
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
|
Pratyush Anand |
3d7e34e |
---
|
|
Pratyush Anand |
3d7e34e |
arch/x86_64.c | 2 +-
|
|
Pratyush Anand |
3d7e34e |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Pratyush Anand |
3d7e34e |
|
|
Pratyush Anand |
3d7e34e |
diff --git a/arch/x86_64.c b/arch/x86_64.c
|
|
Pratyush Anand |
3d7e34e |
index 13990cef839b..3ef33ae4ef2d 100644
|
|
Pratyush Anand |
3d7e34e |
--- a/makedumpfile-1.6.0/arch/x86_64.c
|
|
Pratyush Anand |
3d7e34e |
+++ b/makedumpfile-1.6.0/arch/x86_64.c
|
|
Pratyush Anand |
3d7e34e |
@@ -41,7 +41,7 @@ get_page_offset_x86_64(void)
|
|
Pratyush Anand |
3d7e34e |
unsigned long long virt_start;
|
|
Pratyush Anand |
3d7e34e |
|
|
Pratyush Anand |
3d7e34e |
for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++) {
|
|
Pratyush Anand |
3d7e34e |
- if (virt_start >= __START_KERNEL_map) {
|
|
Pratyush Anand |
3d7e34e |
+ if (virt_start < __START_KERNEL_map) {
|
|
Pratyush Anand |
3d7e34e |
info->page_offset = virt_start - phys_start;
|
|
Pratyush Anand |
3d7e34e |
return TRUE;
|
|
Pratyush Anand |
3d7e34e |
}
|
|
Pratyush Anand |
3d7e34e |
--
|
|
Pratyush Anand |
3d7e34e |
2.7.4
|
|
Pratyush Anand |
3d7e34e |
|