Rebase makedumpfile 1.6.1
Rebase makedumpfile to 1.6.1 and drop the upstreamed patches Signed-off-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
55ff20016d
commit
bd8a109b91
@ -1,108 +0,0 @@
|
||||
From 2c21d4656e8d3c2af2b1e14809d076941ae69e96 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2c21d4656e8d3c2af2b1e14809d076941ae69e96.1468205827.git.panand@redhat.com>
|
||||
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Date: Fri, 17 Jun 2016 18:41:26 +0900
|
||||
Subject: [PATCH] [PATCH v2] Support _count -> _refcount rename in struct page
|
||||
|
||||
_count member was renamed to _refcount in linux commit 0139aa7b7fa12
|
||||
("mm: rename _count, field of the struct page, to _refcount") and this
|
||||
broke makedumpfile. The reason for making the change was to find all users
|
||||
accessing it directly and not through the recommended API. I tried
|
||||
suggesting to revert the change but failed, I see no other choice than to
|
||||
start supporting both _count and _refcount in makedumpfile.
|
||||
|
||||
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
---
|
||||
makedumpfile-1.6.0/makedumpfile.c | 26 +++++++++++++++++++++-----
|
||||
makedumpfile-1.6.0/makedumpfile.h | 3 ++-
|
||||
2 files changed, 23 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/makedumpfile-1.6.0/makedumpfile.c b/makedumpfile-1.6.0/makedumpfile.c
|
||||
index 853b99951706..fd884d3796be 100644
|
||||
--- a/makedumpfile-1.6.0/makedumpfile.c
|
||||
+++ b/makedumpfile-1.6.0/makedumpfile.c
|
||||
@@ -1579,7 +1579,14 @@ get_structure_info(void)
|
||||
*/
|
||||
SIZE_INIT(page, "page");
|
||||
OFFSET_INIT(page.flags, "page", "flags");
|
||||
- OFFSET_INIT(page._count, "page", "_count");
|
||||
+ OFFSET_INIT(page._refcount, "page", "_refcount");
|
||||
+ if (OFFSET(page._refcount) == NOT_FOUND_STRUCTURE) {
|
||||
+ info->flag_use_count = TRUE;
|
||||
+ OFFSET_INIT(page._refcount, "page", "_count");
|
||||
+ } else {
|
||||
+ info->flag_use_count = FALSE;
|
||||
+ }
|
||||
+
|
||||
OFFSET_INIT(page.mapping, "page", "mapping");
|
||||
OFFSET_INIT(page._mapcount, "page", "_mapcount");
|
||||
OFFSET_INIT(page.private, "page", "private");
|
||||
@@ -2044,7 +2051,7 @@ get_mem_type(void)
|
||||
|
||||
if ((SIZE(page) == NOT_FOUND_STRUCTURE)
|
||||
|| (OFFSET(page.flags) == NOT_FOUND_STRUCTURE)
|
||||
- || (OFFSET(page._count) == NOT_FOUND_STRUCTURE)
|
||||
+ || (OFFSET(page._refcount) == NOT_FOUND_STRUCTURE)
|
||||
|| (OFFSET(page.mapping) == NOT_FOUND_STRUCTURE)) {
|
||||
ret = NOT_FOUND_MEMTYPE;
|
||||
} else if ((((SYMBOL(node_data) != NOT_FOUND_SYMBOL)
|
||||
@@ -2151,7 +2158,10 @@ write_vmcoreinfo_data(void)
|
||||
* write the member offset of 1st kernel
|
||||
*/
|
||||
WRITE_MEMBER_OFFSET("page.flags", page.flags);
|
||||
- WRITE_MEMBER_OFFSET("page._count", page._count);
|
||||
+ if (info->flag_use_count)
|
||||
+ WRITE_MEMBER_OFFSET("page._count", page._refcount);
|
||||
+ else
|
||||
+ WRITE_MEMBER_OFFSET("page._refcount", page._refcount);
|
||||
WRITE_MEMBER_OFFSET("page.mapping", page.mapping);
|
||||
WRITE_MEMBER_OFFSET("page.lru", page.lru);
|
||||
WRITE_MEMBER_OFFSET("page._mapcount", page._mapcount);
|
||||
@@ -2491,7 +2501,13 @@ read_vmcoreinfo(void)
|
||||
|
||||
|
||||
READ_MEMBER_OFFSET("page.flags", page.flags);
|
||||
- READ_MEMBER_OFFSET("page._count", page._count);
|
||||
+ READ_MEMBER_OFFSET("page._refcount", page._refcount);
|
||||
+ if (OFFSET(page._refcount) == NOT_FOUND_STRUCTURE) {
|
||||
+ info->flag_use_count = TRUE;
|
||||
+ READ_MEMBER_OFFSET("page._count", page._refcount);
|
||||
+ } else {
|
||||
+ info->flag_use_count = FALSE;
|
||||
+ }
|
||||
READ_MEMBER_OFFSET("page.mapping", page.mapping);
|
||||
READ_MEMBER_OFFSET("page.lru", page.lru);
|
||||
READ_MEMBER_OFFSET("page._mapcount", page._mapcount);
|
||||
@@ -5615,7 +5631,7 @@ __exclude_unnecessary_pages(unsigned long mem_map,
|
||||
pcache = page_cache + (index_pg * SIZE(page));
|
||||
|
||||
flags = ULONG(pcache + OFFSET(page.flags));
|
||||
- _count = UINT(pcache + OFFSET(page._count));
|
||||
+ _count = UINT(pcache + OFFSET(page._refcount));
|
||||
mapping = ULONG(pcache + OFFSET(page.mapping));
|
||||
|
||||
if (OFFSET(page.compound_order) != NOT_FOUND_STRUCTURE) {
|
||||
diff --git a/makedumpfile-1.6.0/makedumpfile.h b/makedumpfile-1.6.0/makedumpfile.h
|
||||
index 251d4bfac060..533e5b89f345 100644
|
||||
--- a/makedumpfile-1.6.0/makedumpfile.h
|
||||
+++ b/makedumpfile-1.6.0/makedumpfile.h
|
||||
@@ -1100,6 +1100,7 @@ struct DumpInfo {
|
||||
int flag_nospace; /* the flag of "No space on device" error */
|
||||
int flag_vmemmap; /* kernel supports vmemmap address space */
|
||||
int flag_excludevm; /* -e - excluding unused vmemmap pages */
|
||||
+ int flag_use_count; /* _refcount is named _count in struct page */
|
||||
unsigned long vaddr_for_vtop; /* virtual address for debugging */
|
||||
long page_size; /* size of page */
|
||||
long page_shift;
|
||||
@@ -1483,7 +1484,7 @@ struct size_table {
|
||||
struct offset_table {
|
||||
struct page {
|
||||
long flags;
|
||||
- long _count;
|
||||
+ long _refcount;
|
||||
long mapping;
|
||||
long lru;
|
||||
long _mapcount;
|
||||
--
|
||||
2.5.5
|
||||
|
@ -1,69 +0,0 @@
|
||||
From: Pratyush Anand <panand@redhat.com>
|
||||
To: ats-kumagai@wm.jp.nec.com
|
||||
Subject: [PATCH Makedumpfile 1/4] x86_64: Calculate page_offset from pt_load
|
||||
Date: Mon, 24 Oct 2016 22:18:43 +0530
|
||||
Cc: Pratyush Anand <panand@redhat.com>, dyoung@redhat.com,
|
||||
kexec@lists.infradead.org, bhe@redhat.com
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
page_offset can always be calculated as 'virtual - physical' for a direct
|
||||
mapping area on x86. Therefore, remove the version dependent calculation
|
||||
and use this method.
|
||||
|
||||
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
||||
---
|
||||
arch/x86_64.c | 24 ++++++++++++++++++++----
|
||||
1 file changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/x86_64.c b/arch/x86_64.c
|
||||
index ddf7be6bc57b..a96fd8ae00a1 100644
|
||||
--- a/makedumpfile-1.6.0/arch/x86_64.c
|
||||
+++ b/makedumpfile-1.6.0/arch/x86_64.c
|
||||
@@ -44,6 +44,24 @@ get_xen_p2m_mfn(void)
|
||||
return NOT_FOUND_LONG_VALUE;
|
||||
}
|
||||
|
||||
+static int
|
||||
+get_page_offset_x86_64(void)
|
||||
+{
|
||||
+ int i;
|
||||
+ unsigned long long phys_start;
|
||||
+ unsigned long long virt_start;
|
||||
+
|
||||
+ for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++) {
|
||||
+ if (virt_start >= __START_KERNEL_map) {
|
||||
+ info->page_offset = virt_start - phys_start;
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ERRMSG("Can't get any pt_load to calculate page offset.\n");
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
int
|
||||
get_phys_base_x86_64(void)
|
||||
{
|
||||
@@ -159,10 +177,8 @@ get_versiondep_info_x86_64(void)
|
||||
else
|
||||
info->max_physmem_bits = _MAX_PHYSMEM_BITS_2_6_31;
|
||||
|
||||
- if (info->kernel_version < KERNEL_VERSION(2, 6, 27))
|
||||
- info->page_offset = __PAGE_OFFSET_ORIG;
|
||||
- else
|
||||
- info->page_offset = __PAGE_OFFSET_2_6_27;
|
||||
+ if (!get_page_offset_x86_64())
|
||||
+ return FALSE;
|
||||
|
||||
if (info->kernel_version < KERNEL_VERSION(2, 6, 31)) {
|
||||
info->vmalloc_start = VMALLOC_START_ORIG;
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
_______________________________________________
|
||||
kexec mailing list
|
||||
kexec@lists.infradead.org
|
||||
http://lists.infradead.org/mailman/listinfo/kexec
|
@ -1,89 +0,0 @@
|
||||
From: Pratyush Anand <panand@redhat.com>
|
||||
To: ats-kumagai@wm.jp.nec.com
|
||||
Subject: [PATCH Makedumpfile 3/4] x86_64: kill is_vmalloc_addr_x86_64()
|
||||
Date: Mon, 24 Oct 2016 22:18:45 +0530
|
||||
Cc: Pratyush Anand <panand@redhat.com>, dyoung@redhat.com,
|
||||
kexec@lists.infradead.org, bhe@redhat.com
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
From kernel documentation:
|
||||
ffffffff80000000 - ffffffff9fffffff (=512 MB) kernel text mapping, from phys 0
|
||||
ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space
|
||||
|
||||
So, it is only the module area which is lying above __START_KERNEL_map.
|
||||
However, kexec-tools only creates PT_LOAD segments for kernel text region
|
||||
and crash memory region. So, we can safely remove the check for
|
||||
!is_vmalloc_addr_x86_64() from get_phys_base_x86_64().
|
||||
|
||||
Since, this was the last usage of is_vmalloc_addr_x86_64(), so kill it as
|
||||
well.
|
||||
|
||||
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
||||
---
|
||||
arch/x86_64.c | 14 +-------------
|
||||
makedumpfile.h | 3 +--
|
||||
2 files changed, 2 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/arch/x86_64.c b/arch/x86_64.c
|
||||
index fe2764a8bec2..597cdac36dfc 100644
|
||||
--- a/makedumpfile-1.6.0/arch/x86_64.c
|
||||
+++ b/makedumpfile-1.6.0/arch/x86_64.c
|
||||
@@ -21,17 +21,6 @@
|
||||
extern struct vmap_pfns *gvmem_pfns;
|
||||
extern int nr_gvmem_pfns;
|
||||
|
||||
-int
|
||||
-is_vmalloc_addr_x86_64(ulong vaddr)
|
||||
-{
|
||||
- /*
|
||||
- * vmalloc, virtual memmap, and module space as VMALLOC space.
|
||||
- */
|
||||
- return ((vaddr >= VMALLOC_START && vaddr <= VMALLOC_END)
|
||||
- || (vaddr >= VMEMMAP_START && vaddr <= VMEMMAP_END)
|
||||
- || (vaddr >= MODULES_VADDR && vaddr <= MODULES_END));
|
||||
-}
|
||||
-
|
||||
static unsigned long
|
||||
get_xen_p2m_mfn(void)
|
||||
{
|
||||
@@ -75,8 +64,7 @@ get_phys_base_x86_64(void)
|
||||
info->phys_base = 0; /* default/traditional */
|
||||
|
||||
for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++) {
|
||||
- if ((virt_start >= __START_KERNEL_map) &&
|
||||
- !(is_vmalloc_addr_x86_64(virt_start))) {
|
||||
+ if (virt_start >= __START_KERNEL_map) {
|
||||
|
||||
info->phys_base = phys_start -
|
||||
(virt_start & ~(__START_KERNEL_map));
|
||||
diff --git a/makedumpfile.h b/makedumpfile.h
|
||||
index 13559651feb6..8a96da1f61bd 100644
|
||||
--- a/makedumpfile-1.6.0/makedumpfile.h
|
||||
+++ b/makedumpfile-1.6.0/makedumpfile.h
|
||||
@@ -859,7 +859,6 @@ unsigned long long vaddr_to_paddr_x86(unsigned long vaddr);
|
||||
#endif /* x86 */
|
||||
|
||||
#ifdef __x86_64__
|
||||
-int is_vmalloc_addr_x86_64(ulong vaddr);
|
||||
int get_phys_base_x86_64(void);
|
||||
int get_machdep_info_x86_64(void);
|
||||
int get_versiondep_info_x86_64(void);
|
||||
@@ -869,7 +868,7 @@ unsigned long long vtop4_x86_64(unsigned long vaddr);
|
||||
#define get_machdep_info() get_machdep_info_x86_64()
|
||||
#define get_versiondep_info() get_versiondep_info_x86_64()
|
||||
#define vaddr_to_paddr(X) vtop4_x86_64(X)
|
||||
-#define is_phys_addr(X) (!is_vmalloc_addr_x86_64(X))
|
||||
+#define is_phys_addr(X) stub_true_ul(X)
|
||||
#endif /* x86_64 */
|
||||
|
||||
#ifdef __powerpc64__ /* powerpc64 */
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
_______________________________________________
|
||||
kexec mailing list
|
||||
kexec@lists.infradead.org
|
||||
http://lists.infradead.org/mailman/listinfo/kexec
|
@ -1,58 +0,0 @@
|
||||
From: Pratyush Anand <panand@redhat.com>
|
||||
To: ats-kumagai@wm.jp.nec.com
|
||||
Subject: [PATCH Makedumpfile 4/4] x86_64: kill some unused initialization
|
||||
Date: Mon, 24 Oct 2016 22:18:46 +0530
|
||||
Cc: Pratyush Anand <panand@redhat.com>, dyoung@redhat.com,
|
||||
kexec@lists.infradead.org, bhe@redhat.com
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
VMALLOC_START, VMALLOC_END, MODULES_VADDR and MODULES_END are mo more
|
||||
needed for x86_64 now. So, kill their initialization.
|
||||
|
||||
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
||||
---
|
||||
arch/x86_64.c | 4 ----
|
||||
makedumpfile.h | 2 --
|
||||
2 files changed, 6 deletions(-)
|
||||
|
||||
diff --git a/arch/x86_64.c b/arch/x86_64.c
|
||||
index 597cdac36dfc..13990cef839b 100644
|
||||
--- a/makedumpfile-1.6.0/arch/x86_64.c
|
||||
+++ b/makedumpfile-1.6.0/arch/x86_64.c
|
||||
@@ -169,13 +169,9 @@ get_versiondep_info_x86_64(void)
|
||||
return FALSE;
|
||||
|
||||
if (info->kernel_version < KERNEL_VERSION(2, 6, 31)) {
|
||||
- info->vmalloc_start = VMALLOC_START_ORIG;
|
||||
- info->vmalloc_end = VMALLOC_END_ORIG;
|
||||
info->vmemmap_start = VMEMMAP_START_ORIG;
|
||||
info->vmemmap_end = VMEMMAP_END_ORIG;
|
||||
} else {
|
||||
- info->vmalloc_start = VMALLOC_START_2_6_31;
|
||||
- info->vmalloc_end = VMALLOC_END_2_6_31;
|
||||
info->vmemmap_start = VMEMMAP_START_2_6_31;
|
||||
info->vmemmap_end = VMEMMAP_END_2_6_31;
|
||||
}
|
||||
diff --git a/makedumpfile.h b/makedumpfile.h
|
||||
index 8a96da1f61bd..338c651388f0 100644
|
||||
--- a/makedumpfile-1.6.0/makedumpfile.h
|
||||
+++ b/makedumpfile-1.6.0/makedumpfile.h
|
||||
@@ -575,8 +575,6 @@ int get_va_bits_arm64(void);
|
||||
#define __START_KERNEL_map (0xffffffff80000000)
|
||||
#define KERNEL_IMAGE_SIZE_ORIG (0x0000000008000000) /* 2.6.25, or former */
|
||||
#define KERNEL_IMAGE_SIZE_2_6_26 (0x0000000020000000) /* 2.6.26, or later */
|
||||
-#define MODULES_VADDR (__START_KERNEL_map + NUMBER(KERNEL_IMAGE_SIZE))
|
||||
-#define MODULES_END (0xfffffffffff00000)
|
||||
#define KVBASE PAGE_OFFSET
|
||||
#define _SECTION_SIZE_BITS (27)
|
||||
#define _MAX_PHYSMEM_BITS_ORIG (40)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
_______________________________________________
|
||||
kexec mailing list
|
||||
kexec@lists.infradead.org
|
||||
http://lists.infradead.org/mailman/listinfo/kexec
|
@ -1,148 +0,0 @@
|
||||
From: Pratyush Anand <panand@redhat.com>
|
||||
To: ats-kumagai@wm.jp.nec.com
|
||||
Subject: [PATCH Makedumpfile 2/4] x86_64: translate all VA to PA using page
|
||||
table values
|
||||
Date: Mon, 24 Oct 2016 22:18:44 +0530
|
||||
Cc: Pratyush Anand <panand@redhat.com>, dyoung@redhat.com,
|
||||
kexec@lists.infradead.org, bhe@redhat.com
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
Currently we translate some of the VA areas using linear mapping while some
|
||||
other(which can not be linearly mapped) using page table.
|
||||
|
||||
However, we will have entry of a page in the page table irrespective of its
|
||||
virtual region. So, we can always look into page table for any VA to PA
|
||||
translation. This approach will solve lot of complexity in makedumpfile. It
|
||||
will in turn remove dependency over variables like VMALLOC_START,
|
||||
MODULES_VADDR etc whose definition keeps changing in newer kernel version.
|
||||
|
||||
Moreover, I do not see any side effect of this approach in terms of
|
||||
execution timing. I tested with IBM x3950 X6 machine having 4136359 MB of
|
||||
memory. These are the results of makedumpfile execution time:
|
||||
|
||||
Without this patch:
|
||||
===================
|
||||
With -d 31:
|
||||
Trial 1: 237.59526248 S
|
||||
Trial 2: 235.236914962 S
|
||||
Trail 3: 237.678712045 S
|
||||
|
||||
With -d 1:
|
||||
Trial 1: 2548.905296877 S
|
||||
Trial 2: 2549.759881756 S
|
||||
|
||||
With this patch:
|
||||
===================
|
||||
With -d 31:
|
||||
Trial 1: 232.713841516 S
|
||||
Trial 2: 228.45697177 S
|
||||
Trail 3: 232.942262441 S
|
||||
|
||||
With -d 1:
|
||||
Trial 1: 2768.424565806 S
|
||||
Trial 2: 2749.622115455 S
|
||||
Trail 3: 2537.770359073 S
|
||||
|
||||
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
||||
---
|
||||
arch/x86_64.c | 42 ++++++++----------------------------------
|
||||
makedumpfile.h | 4 ++--
|
||||
2 files changed, 10 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/arch/x86_64.c b/arch/x86_64.c
|
||||
index a96fd8ae00a1..fe2764a8bec2 100644
|
||||
--- a/makedumpfile-1.6.0/arch/x86_64.c
|
||||
+++ b/makedumpfile-1.6.0/arch/x86_64.c
|
||||
@@ -203,6 +203,12 @@ vtop4_x86_64(unsigned long vaddr)
|
||||
{
|
||||
unsigned long page_dir, pml4, pgd_paddr, pgd_pte, pmd_paddr, pmd_pte;
|
||||
unsigned long pte_paddr, pte;
|
||||
+ unsigned long phys_base;
|
||||
+
|
||||
+ if (SYMBOL(phys_base) != NOT_FOUND_SYMBOL)
|
||||
+ phys_base = info->phys_base;
|
||||
+ else
|
||||
+ phys_base = 0;
|
||||
|
||||
if (SYMBOL(init_level4_pgt) == NOT_FOUND_SYMBOL) {
|
||||
ERRMSG("Can't get the symbol of init_level4_pgt.\n");
|
||||
@@ -212,9 +218,9 @@ vtop4_x86_64(unsigned long vaddr)
|
||||
/*
|
||||
* Get PGD.
|
||||
*/
|
||||
- page_dir = SYMBOL(init_level4_pgt);
|
||||
+ page_dir = SYMBOL(init_level4_pgt) - __START_KERNEL_map + phys_base;
|
||||
page_dir += pml4_index(vaddr) * sizeof(unsigned long);
|
||||
- if (!readmem(VADDR, page_dir, &pml4, sizeof pml4)) {
|
||||
+ if (!readmem(PADDR, page_dir, &pml4, sizeof pml4)) {
|
||||
ERRMSG("Can't get pml4 (page_dir:%lx).\n", page_dir);
|
||||
return NOT_PADDR;
|
||||
}
|
||||
@@ -285,38 +291,6 @@ vtop4_x86_64(unsigned long vaddr)
|
||||
return (pte & ENTRY_MASK) + PAGEOFFSET(vaddr);
|
||||
}
|
||||
|
||||
-unsigned long long
|
||||
-vaddr_to_paddr_x86_64(unsigned long vaddr)
|
||||
-{
|
||||
- unsigned long phys_base;
|
||||
- unsigned long long paddr;
|
||||
-
|
||||
- /*
|
||||
- * Check the relocatable kernel.
|
||||
- */
|
||||
- if (SYMBOL(phys_base) != NOT_FOUND_SYMBOL)
|
||||
- phys_base = info->phys_base;
|
||||
- else
|
||||
- phys_base = 0;
|
||||
-
|
||||
- if (is_vmalloc_addr_x86_64(vaddr)) {
|
||||
- if ((paddr = vtop4_x86_64(vaddr)) == NOT_PADDR) {
|
||||
- ERRMSG("Can't convert a virtual address(%lx) to " \
|
||||
- "physical address.\n", vaddr);
|
||||
- return NOT_PADDR;
|
||||
- }
|
||||
- } else if (vaddr >= __START_KERNEL_map) {
|
||||
- paddr = vaddr - __START_KERNEL_map + phys_base;
|
||||
-
|
||||
- } else {
|
||||
- if (is_xen_memory())
|
||||
- paddr = vaddr - PAGE_OFFSET_XEN_DOM0;
|
||||
- else
|
||||
- paddr = vaddr - PAGE_OFFSET;
|
||||
- }
|
||||
- return paddr;
|
||||
-}
|
||||
-
|
||||
/*
|
||||
* for Xen extraction
|
||||
*/
|
||||
diff --git a/makedumpfile.h b/makedumpfile.h
|
||||
index a5955ff750e5..13559651feb6 100644
|
||||
--- a/makedumpfile-1.6.0/makedumpfile.h
|
||||
+++ b/makedumpfile-1.6.0/makedumpfile.h
|
||||
@@ -863,12 +863,12 @@ int is_vmalloc_addr_x86_64(ulong vaddr);
|
||||
int get_phys_base_x86_64(void);
|
||||
int get_machdep_info_x86_64(void);
|
||||
int get_versiondep_info_x86_64(void);
|
||||
-unsigned long long vaddr_to_paddr_x86_64(unsigned long vaddr);
|
||||
+unsigned long long vtop4_x86_64(unsigned long vaddr);
|
||||
#define find_vmemmap() find_vmemmap_x86_64()
|
||||
#define get_phys_base() get_phys_base_x86_64()
|
||||
#define get_machdep_info() get_machdep_info_x86_64()
|
||||
#define get_versiondep_info() get_versiondep_info_x86_64()
|
||||
-#define vaddr_to_paddr(X) vaddr_to_paddr_x86_64(X)
|
||||
+#define vaddr_to_paddr(X) vtop4_x86_64(X)
|
||||
#define is_phys_addr(X) (!is_vmalloc_addr_x86_64(X))
|
||||
#endif /* x86_64 */
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
_______________________________________________
|
||||
kexec mailing list
|
||||
kexec@lists.infradead.org
|
||||
http://lists.infradead.org/mailman/listinfo/kexec
|
@ -1,32 +0,0 @@
|
||||
From 0ebcd6f3570dd66bff0930872b8bf859bdcf302a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0ebcd6f3570dd66bff0930872b8bf859bdcf302a.1477548646.git.panand@redhat.com>
|
||||
From: Pratyush Anand <panand@redhat.com>
|
||||
Date: Thu, 27 Oct 2016 11:34:33 +0530
|
||||
Subject: [PATCH] x86_64: fix page_offset calculation
|
||||
|
||||
Kernel text region lies above __START_KERNEL_map, which is linearly mapped
|
||||
however not a direct mapping. Direct mapping region lies below it instead.
|
||||
So, page_offset can only be calculated with a region which is below
|
||||
__START_KERNEL_map.
|
||||
|
||||
Signed-off-by: Pratyush Anand <panand@redhat.com>
|
||||
---
|
||||
arch/x86_64.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86_64.c b/arch/x86_64.c
|
||||
index 13990cef839b..3ef33ae4ef2d 100644
|
||||
--- a/makedumpfile-1.6.0/arch/x86_64.c
|
||||
+++ b/makedumpfile-1.6.0/arch/x86_64.c
|
||||
@@ -41,7 +41,7 @@ get_page_offset_x86_64(void)
|
||||
unsigned long long virt_start;
|
||||
|
||||
for (i = 0; get_pt_load(i, &phys_start, NULL, &virt_start, NULL); i++) {
|
||||
- if (virt_start >= __START_KERNEL_map) {
|
||||
+ if (virt_start < __START_KERNEL_map) {
|
||||
info->page_offset = virt_start - phys_start;
|
||||
return TRUE;
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
@ -13,7 +13,7 @@ Source4: kdump.sysconfig.i386
|
||||
Source5: kdump.sysconfig.ppc64
|
||||
Source7: mkdumprd
|
||||
Source8: kdump.conf
|
||||
Source9: http://downloads.sourceforge.net/project/makedumpfile/makedumpfile/1.6.0/makedumpfile-1.6.0.tar.gz
|
||||
Source9: http://downloads.sourceforge.net/project/makedumpfile/makedumpfile/1.6.1/makedumpfile-1.6.1.tar.gz
|
||||
Source10: kexec-kdump-howto.txt
|
||||
Source12: mkdumprd.8
|
||||
Source14: 98-kexec.rules
|
||||
@ -85,13 +85,6 @@ Obsoletes: diskdumputils netdump kexec-tools-eppic
|
||||
# Patches 601 onward are generic patches
|
||||
#
|
||||
Patch601: kexec-tools-2.0.3-disable-kexec-test.patch
|
||||
Patch602: kexec-tools-2.0.12-makedumpfile-Support-_count-_refcount-rename-in-struct-p.patch
|
||||
|
||||
Patch604: kexec-tools-2.0.13-makedumpfile-x86-64-calculate-page-offset-from-pt-load.patch
|
||||
Patch605: kexec-tools-2.0.13-makedumpfile-x86-64-translate-all-VA-to-PA-using-page-table-values.patch
|
||||
Patch606: kexec-tools-2.0.13-makedumpfile-x86-64-kill-is-vmalloc-addr-x86-64.patch
|
||||
Patch607: kexec-tools-2.0.13-makedumpfile-x86-64-kill-some-unused-initialization.patch
|
||||
Patch608: kexec-tools-2.0.13-makedumpfile-x86_64-fix-page_offset-calculation.patch
|
||||
|
||||
%description
|
||||
kexec-tools provides /sbin/kexec binary that facilitates a new
|
||||
@ -115,12 +108,6 @@ tar -z -x -v -f %{SOURCE19}
|
||||
tar -z -x -v -f %{SOURCE23}
|
||||
|
||||
%patch601 -p1
|
||||
%patch602 -p1
|
||||
%patch604 -p1
|
||||
%patch605 -p1
|
||||
%patch606 -p1
|
||||
%patch607 -p1
|
||||
%patch608 -p1
|
||||
|
||||
%ifarch ppc
|
||||
%define archdef ARCH=ppc
|
||||
@ -147,8 +134,8 @@ cp %{SOURCE27} .
|
||||
make
|
||||
%ifarch %{ix86} x86_64 ppc64 s390x ppc64le
|
||||
make -C eppic/libeppic
|
||||
make -C makedumpfile-1.6.0 LINKTYPE=dynamic USELZO=on USESNAPPY=on
|
||||
make -C makedumpfile-1.6.0 LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so
|
||||
make -C makedumpfile-1.6.1 LINKTYPE=dynamic USELZO=on USESNAPPY=on
|
||||
make -C makedumpfile-1.6.1 LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" eppic_makedumpfile.so
|
||||
%endif
|
||||
make -C kdump-anaconda-addon/po
|
||||
|
||||
@ -191,13 +178,13 @@ mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
||||
install -m 755 %{SOURCE17} $RPM_BUILD_ROOT/usr/sbin/rhcrashkernel-param
|
||||
|
||||
%ifarch %{ix86} x86_64 ppc64 s390x ppc64le
|
||||
install -m 755 makedumpfile-1.6.0/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
|
||||
install -m 644 makedumpfile-1.6.0/makedumpfile.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/makedumpfile.8.gz
|
||||
install -m 644 makedumpfile-1.6.0/makedumpfile.conf.5.gz $RPM_BUILD_ROOT/%{_mandir}/man5/makedumpfile.conf.5.gz
|
||||
install -m 644 makedumpfile-1.6.0/makedumpfile.conf $RPM_BUILD_ROOT/%{_sysconfdir}/makedumpfile.conf.sample
|
||||
install -m 755 makedumpfile-1.6.0/eppic_makedumpfile.so $RPM_BUILD_ROOT/%{_libdir}/eppic_makedumpfile.so
|
||||
install -m 755 makedumpfile-1.6.1/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
|
||||
install -m 644 makedumpfile-1.6.1/makedumpfile.8.gz $RPM_BUILD_ROOT/%{_mandir}/man8/makedumpfile.8.gz
|
||||
install -m 644 makedumpfile-1.6.1/makedumpfile.conf.5.gz $RPM_BUILD_ROOT/%{_mandir}/man5/makedumpfile.conf.5.gz
|
||||
install -m 644 makedumpfile-1.6.1/makedumpfile.conf $RPM_BUILD_ROOT/%{_sysconfdir}/makedumpfile.conf.sample
|
||||
install -m 755 makedumpfile-1.6.1/eppic_makedumpfile.so $RPM_BUILD_ROOT/%{_libdir}/eppic_makedumpfile.so
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/
|
||||
install -m 644 makedumpfile-1.6.0/eppic_scripts/* $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/
|
||||
install -m 644 makedumpfile-1.6.1/eppic_scripts/* $RPM_BUILD_ROOT/usr/share/makedumpfile/eppic_scripts/
|
||||
%endif
|
||||
make -C kdump-anaconda-addon install DESTDIR=$RPM_BUILD_ROOT
|
||||
%find_lang kdump-anaconda-addon
|
||||
|
2
sources
2
sources
@ -1,4 +1,4 @@
|
||||
SHA512 (eppic_050615.tar.gz) = de23c3cd59ded23f2f0092c194b2169e78fcd385a8df7daf34b36f3bb2d5ddac2cdd3657bbe640beec447725988e928962baf62cf9deff8849da734390280a4f
|
||||
SHA512 (makedumpfile-1.6.0.tar.gz) = 3c1d068d347107070c20d0375648d1a9691891bd77b2769afad40776cbed6573bed8cba94f037a5c0cd630e770c0fa0c49d184611fbeafcbc8463a0a35dd170b
|
||||
SHA512 (kexec-tools-2.0.14.tar.xz) = 8c1f9d1f4bb69a621961d45091f9c8349535ae69b80168423663685b44d89e1b9324d5cd11c83e86d805a3371f4f1600b0def551c52efb3c6cf020e9c11c273f
|
||||
SHA512 (kdump-anaconda-addon-005-25-g2a4398f.tar.gz) = 0ce8602607a8d781e1804973e6affef1ed3dce729bb1a5525b2a8129f28bcb88713f6e8be5e3f41151223518096f7eed33dd3ea0e63ac7dc338b21fb78664e7e
|
||||
SHA512 (makedumpfile-1.6.1.tar.gz) = fd343e8117e38f9fd608f914297dfe54e0b677733db1871db5824d8ca549e6b8709ae5df6ec82362c100c6d8f35815c39c48e0c87395a30e6305aba7d11c8708
|
||||
|
Loading…
Reference in New Issue
Block a user