Accepting request 407916 from home:ptesarik:branches:Kernel:kdump
Upgrade to makedumpfile-1.6.0. OBS-URL: https://build.opensuse.org/request/show/407916 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=96
This commit is contained in:
parent
500ee3d51f
commit
56b3fbcf37
@ -1,213 +0,0 @@
|
||||
From: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
|
||||
Date: Tue, 26 Jan 2016 10:11:33 +0900
|
||||
Subject: [PATCH] Looking for page.compound_order/compound_dtor to exclude hugepages
|
||||
Patch-mainline: Released-1-6-0
|
||||
Git-commit: 5bc1f520cc7ab6e18abdd5af21c80ecda6339eb5
|
||||
|
||||
* Required for kernel 4.4
|
||||
|
||||
Due to some changes in struct page, hugepages wouldn't be removed on
|
||||
linux 4.4. makedumpfile reads page.lru.prev to get "order" (number of hugepages)
|
||||
and page.lru.next to get "dtor" (destructor for hugepages) to detect hugepages,
|
||||
but the offsets of the two was changed in linux 4.4.
|
||||
|
||||
kernel version | where is order | where is dtor
|
||||
----------------+---------------------------+---------------------------
|
||||
- v3.19 | lru.prev | lru.next
|
||||
v4.0 - v4.3 | compound_order(=lru.prev) | compound_dtor(=lru.next)
|
||||
v4.4 - | compound_order | compound_dtor
|
||||
|
||||
As above, OFFSET(page.compound_order) and OFFSET(page.compound_dtor) are
|
||||
definitely necessary in VMCOREINFO on linux 4.4 and later.
|
||||
|
||||
Further, the content of page.compound_dtor was changed from direct address
|
||||
of dtor to the ID of it in linux 4.4.
|
||||
|
||||
Signed-off-by: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
|
||||
---
|
||||
makedumpfile.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++-----------
|
||||
makedumpfile.h | 5 ++--
|
||||
2 files changed, 65 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/makedumpfile.c b/makedumpfile.c
|
||||
index 58cce3eb3d76..1f2f26ce8365 100644
|
||||
--- a/makedumpfile.c
|
||||
+++ b/makedumpfile.c
|
||||
@@ -236,6 +236,15 @@ is_in_same_page(unsigned long vaddr1, unsigned long vaddr2)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+static inline int
|
||||
+isHugetlb(dtor)
|
||||
+{
|
||||
+ return ((NUMBER(HUGETLB_PAGE_DTOR) != NOT_FOUND_NUMBER)
|
||||
+ && (NUMBER(HUGETLB_PAGE_DTOR) == dtor))
|
||||
+ || ((SYMBOL(free_huge_page) != NOT_FOUND_SYMBOL)
|
||||
+ && (SYMBOL(free_huge_page) == dtor));
|
||||
+}
|
||||
+
|
||||
static inline unsigned long
|
||||
calculate_len_buf_out(long page_size)
|
||||
{
|
||||
@@ -1617,6 +1626,8 @@ get_structure_info(void)
|
||||
OFFSET_INIT(page.mapping, "page", "mapping");
|
||||
OFFSET_INIT(page._mapcount, "page", "_mapcount");
|
||||
OFFSET_INIT(page.private, "page", "private");
|
||||
+ OFFSET_INIT(page.compound_dtor, "page", "compound_dtor");
|
||||
+ OFFSET_INIT(page.compound_order, "page", "compound_order");
|
||||
|
||||
/*
|
||||
* Some vmlinux(s) don't have debugging information about
|
||||
@@ -1723,6 +1734,8 @@ get_structure_info(void)
|
||||
NUMBER(PG_head_mask) = 1UL << NUMBER(PG_head);
|
||||
}
|
||||
|
||||
+ ENUM_NUMBER_INIT(HUGETLB_PAGE_DTOR, "HUGETLB_PAGE_DTOR");
|
||||
+
|
||||
ENUM_TYPE_SIZE_INIT(pageflags, "pageflags");
|
||||
|
||||
TYPEDEF_SIZE_INIT(nodemask_t, "nodemask_t");
|
||||
@@ -2170,6 +2183,8 @@ write_vmcoreinfo_data(void)
|
||||
WRITE_MEMBER_OFFSET("page.lru", page.lru);
|
||||
WRITE_MEMBER_OFFSET("page._mapcount", page._mapcount);
|
||||
WRITE_MEMBER_OFFSET("page.private", page.private);
|
||||
+ WRITE_MEMBER_OFFSET("page.compound_dtor", page.compound_dtor);
|
||||
+ WRITE_MEMBER_OFFSET("page.compound_order", page.compound_order);
|
||||
WRITE_MEMBER_OFFSET("mem_section.section_mem_map",
|
||||
mem_section.section_mem_map);
|
||||
WRITE_MEMBER_OFFSET("pglist_data.node_zones", pglist_data.node_zones);
|
||||
@@ -2239,6 +2254,8 @@ write_vmcoreinfo_data(void)
|
||||
WRITE_NUMBER("PAGE_BUDDY_MAPCOUNT_VALUE", PAGE_BUDDY_MAPCOUNT_VALUE);
|
||||
WRITE_NUMBER("KERNEL_IMAGE_SIZE", KERNEL_IMAGE_SIZE);
|
||||
|
||||
+ WRITE_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
|
||||
+
|
||||
/*
|
||||
* write the source file of 1st kernel
|
||||
*/
|
||||
@@ -2511,6 +2528,8 @@ read_vmcoreinfo(void)
|
||||
READ_MEMBER_OFFSET("page.lru", page.lru);
|
||||
READ_MEMBER_OFFSET("page._mapcount", page._mapcount);
|
||||
READ_MEMBER_OFFSET("page.private", page.private);
|
||||
+ READ_MEMBER_OFFSET("page.compound_dtor", page.compound_dtor);
|
||||
+ READ_MEMBER_OFFSET("page.compound_order", page.compound_order);
|
||||
READ_MEMBER_OFFSET("mem_section.section_mem_map",
|
||||
mem_section.section_mem_map);
|
||||
READ_MEMBER_OFFSET("pglist_data.node_zones", pglist_data.node_zones);
|
||||
@@ -2580,6 +2599,8 @@ read_vmcoreinfo(void)
|
||||
READ_NUMBER("PAGE_BUDDY_MAPCOUNT_VALUE", PAGE_BUDDY_MAPCOUNT_VALUE);
|
||||
READ_NUMBER("KERNEL_IMAGE_SIZE", KERNEL_IMAGE_SIZE);
|
||||
|
||||
+ READ_NUMBER("HUGETLB_PAGE_DTOR", HUGETLB_PAGE_DTOR);
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -5500,6 +5521,7 @@ __exclude_unnecessary_pages(unsigned long mem_map,
|
||||
unsigned char page_cache[SIZE(page) * PGMM_CACHED];
|
||||
unsigned char *pcache;
|
||||
unsigned int _count, _mapcount = 0, compound_order = 0;
|
||||
+ unsigned int order_offset, dtor_offset;
|
||||
unsigned long flags, mapping, private = 0;
|
||||
unsigned long compound_dtor;
|
||||
|
||||
@@ -5568,26 +5590,52 @@ __exclude_unnecessary_pages(unsigned long mem_map,
|
||||
_count = UINT(pcache + OFFSET(page._refcount));
|
||||
mapping = ULONG(pcache + OFFSET(page.mapping));
|
||||
|
||||
- if ((index_pg < PGMM_CACHED - 1) &&
|
||||
- isCompoundHead(flags)) {
|
||||
- compound_order = ULONG(pcache + SIZE(page) + OFFSET(page.lru)
|
||||
- + OFFSET(list_head.prev));
|
||||
- compound_dtor = ULONG(pcache + SIZE(page) + OFFSET(page.lru)
|
||||
- + OFFSET(list_head.next));
|
||||
+ if (OFFSET(page.compound_order) != NOT_FOUND_STRUCTURE) {
|
||||
+ order_offset = OFFSET(page.compound_order);
|
||||
+ } else {
|
||||
+ if (info->kernel_version < KERNEL_VERSION(4, 4, 0))
|
||||
+ order_offset = OFFSET(page.lru) + OFFSET(list_head.prev);
|
||||
+ else
|
||||
+ order_offset = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (OFFSET(page.compound_dtor) != NOT_FOUND_STRUCTURE) {
|
||||
+ dtor_offset = OFFSET(page.compound_dtor);
|
||||
+ } else {
|
||||
+ if (info->kernel_version < KERNEL_VERSION(4, 4, 0))
|
||||
+ dtor_offset = OFFSET(page.lru) + OFFSET(list_head.next);
|
||||
+ else
|
||||
+ dtor_offset = 0;
|
||||
+ }
|
||||
+
|
||||
+ compound_order = 0;
|
||||
+ compound_dtor = 0;
|
||||
+ /*
|
||||
+ * The last pfn of the mem_map cache must not be compound page
|
||||
+ * since all compound pages are aligned to its page order and
|
||||
+ * PGMM_CACHED is a power of 2.
|
||||
+ */
|
||||
+ if ((index_pg < PGMM_CACHED - 1) && isCompoundHead(flags)) {
|
||||
+ if (order_offset)
|
||||
+ compound_order = USHORT(pcache + SIZE(page) + order_offset);
|
||||
+
|
||||
+ if (dtor_offset) {
|
||||
+ /*
|
||||
+ * compound_dtor has been changed from the address of descriptor
|
||||
+ * to the ID of it since linux-4.4.
|
||||
+ */
|
||||
+ if (info->kernel_version >= KERNEL_VERSION(4, 4, 0)) {
|
||||
+ compound_dtor = USHORT(pcache + SIZE(page) + dtor_offset);
|
||||
+ } else {
|
||||
+ compound_dtor = ULONG(pcache + SIZE(page) + dtor_offset);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if ((compound_order >= sizeof(unsigned long) * 8)
|
||||
|| ((pfn & ((1UL << compound_order) - 1)) != 0)) {
|
||||
/* Invalid order */
|
||||
compound_order = 0;
|
||||
}
|
||||
- } else {
|
||||
- /*
|
||||
- * The last pfn of the mem_map cache must not be compound page
|
||||
- * since all compound pages are aligned to its page order and
|
||||
- * PGMM_CACHED is a power of 2.
|
||||
- */
|
||||
- compound_order = 0;
|
||||
- compound_dtor = 0;
|
||||
}
|
||||
|
||||
if (OFFSET(page._mapcount) != NOT_FOUND_STRUCTURE)
|
||||
diff --git a/makedumpfile.h b/makedumpfile.h
|
||||
index bc0d4218fe2a..5b35616eda37 100644
|
||||
--- a/makedumpfile.h
|
||||
+++ b/makedumpfile.h
|
||||
@@ -152,8 +152,6 @@ test_bit(int nr, unsigned long addr)
|
||||
#define isLRU(flags) test_bit(NUMBER(PG_lru), flags)
|
||||
#define isPrivate(flags) test_bit(NUMBER(PG_private), flags)
|
||||
#define isCompoundHead(flags) (!!((flags) & NUMBER(PG_head_mask)))
|
||||
-#define isHugetlb(dtor) ((SYMBOL(free_huge_page) != NOT_FOUND_SYMBOL) \
|
||||
- && (SYMBOL(free_huge_page) == dtor))
|
||||
#define isSwapCache(flags) test_bit(NUMBER(PG_swapcache), flags)
|
||||
#define isHWPOISON(flags) (test_bit(NUMBER(PG_hwpoison), flags) \
|
||||
&& (NUMBER(PG_hwpoison) != NOT_FOUND_NUMBER))
|
||||
@@ -1485,6 +1483,8 @@ struct offset_table {
|
||||
long lru;
|
||||
long _mapcount;
|
||||
long private;
|
||||
+ long compound_dtor;
|
||||
+ long compound_order;
|
||||
} page;
|
||||
struct mem_section {
|
||||
long section_mem_map;
|
||||
@@ -1680,6 +1680,7 @@ struct number_table {
|
||||
long KERNEL_IMAGE_SIZE;
|
||||
long SECTION_SIZE_BITS;
|
||||
long MAX_PHYSMEM_BITS;
|
||||
+ long HUGETLB_PAGE_DTOR;
|
||||
};
|
||||
|
||||
struct srcfile_table {
|
||||
--
|
||||
2.9.0
|
||||
|
@ -1,120 +0,0 @@
|
||||
From: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
|
||||
Date: Wed, 24 Feb 2016 17:09:44 +0900
|
||||
Subject: [PATCH] Skip examining compound tail pages
|
||||
Patch-mainline: Released-1-6-0
|
||||
Git-commit: 13b4233e91a9d5aa14c4b0643af36cbc29b9fa7a
|
||||
|
||||
* Required for kernel 4.5
|
||||
|
||||
For filtering user pages, we check whether each page's
|
||||
page->mapping have PAGE_MAPPING_ANON bit.
|
||||
However, unexcludable compound tail pages can have
|
||||
PAGE_MAPPING_ANON since kernel 4.5, they can be excluded
|
||||
as user page wrong.
|
||||
|
||||
Now, we don't need to check compound tail pages because
|
||||
excludable compound pages must be excluded at a time by
|
||||
exclude_range() when the corresponding head page is checked.
|
||||
So just skipping tail pages can avoid wrong filtering.
|
||||
|
||||
Signed-off-by: Atsushi Kumagai <ats-kumagai@wm.jp.nec.com>
|
||||
---
|
||||
makedumpfile.c | 23 ++++++++++++++++++-----
|
||||
makedumpfile.h | 1 +
|
||||
2 files changed, 19 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/makedumpfile.c b/makedumpfile.c
|
||||
index 1f2f26ce8365..aab9dd496253 100644
|
||||
--- a/makedumpfile.c
|
||||
+++ b/makedumpfile.c
|
||||
@@ -1628,6 +1628,7 @@ get_structure_info(void)
|
||||
OFFSET_INIT(page.private, "page", "private");
|
||||
OFFSET_INIT(page.compound_dtor, "page", "compound_dtor");
|
||||
OFFSET_INIT(page.compound_order, "page", "compound_order");
|
||||
+ OFFSET_INIT(page.compound_head, "page", "compound_head");
|
||||
|
||||
/*
|
||||
* Some vmlinux(s) don't have debugging information about
|
||||
@@ -2185,6 +2186,7 @@ write_vmcoreinfo_data(void)
|
||||
WRITE_MEMBER_OFFSET("page.private", page.private);
|
||||
WRITE_MEMBER_OFFSET("page.compound_dtor", page.compound_dtor);
|
||||
WRITE_MEMBER_OFFSET("page.compound_order", page.compound_order);
|
||||
+ WRITE_MEMBER_OFFSET("page.compound_head", page.compound_head);
|
||||
WRITE_MEMBER_OFFSET("mem_section.section_mem_map",
|
||||
mem_section.section_mem_map);
|
||||
WRITE_MEMBER_OFFSET("pglist_data.node_zones", pglist_data.node_zones);
|
||||
@@ -2530,6 +2532,7 @@ read_vmcoreinfo(void)
|
||||
READ_MEMBER_OFFSET("page.private", page.private);
|
||||
READ_MEMBER_OFFSET("page.compound_dtor", page.compound_dtor);
|
||||
READ_MEMBER_OFFSET("page.compound_order", page.compound_order);
|
||||
+ READ_MEMBER_OFFSET("page.compound_head", page.compound_head);
|
||||
READ_MEMBER_OFFSET("mem_section.section_mem_map",
|
||||
mem_section.section_mem_map);
|
||||
READ_MEMBER_OFFSET("pglist_data.node_zones", pglist_data.node_zones);
|
||||
@@ -5523,7 +5526,7 @@ __exclude_unnecessary_pages(unsigned long mem_map,
|
||||
unsigned int _count, _mapcount = 0, compound_order = 0;
|
||||
unsigned int order_offset, dtor_offset;
|
||||
unsigned long flags, mapping, private = 0;
|
||||
- unsigned long compound_dtor;
|
||||
+ unsigned long compound_dtor, compound_head = 0;
|
||||
|
||||
/*
|
||||
* If a multi-page exclusion is pending, do it first
|
||||
@@ -5611,9 +5614,9 @@ __exclude_unnecessary_pages(unsigned long mem_map,
|
||||
compound_order = 0;
|
||||
compound_dtor = 0;
|
||||
/*
|
||||
- * The last pfn of the mem_map cache must not be compound page
|
||||
- * since all compound pages are aligned to its page order and
|
||||
- * PGMM_CACHED is a power of 2.
|
||||
+ * The last pfn of the mem_map cache must not be compound head
|
||||
+ * page since all compound pages are aligned to its page order
|
||||
+ * and PGMM_CACHED is a power of 2.
|
||||
*/
|
||||
if ((index_pg < PGMM_CACHED - 1) && isCompoundHead(flags)) {
|
||||
if (order_offset)
|
||||
@@ -5637,6 +5640,8 @@ __exclude_unnecessary_pages(unsigned long mem_map,
|
||||
compound_order = 0;
|
||||
}
|
||||
}
|
||||
+ if (OFFSET(page.compound_head) != NOT_FOUND_STRUCTURE)
|
||||
+ compound_head = ULONG(pcache + OFFSET(page.compound_head));
|
||||
|
||||
if (OFFSET(page._mapcount) != NOT_FOUND_STRUCTURE)
|
||||
_mapcount = UINT(pcache + OFFSET(page._mapcount));
|
||||
@@ -5645,11 +5650,19 @@ __exclude_unnecessary_pages(unsigned long mem_map,
|
||||
|
||||
nr_pages = 1 << compound_order;
|
||||
pfn_counter = NULL;
|
||||
+
|
||||
+ /*
|
||||
+ * Excludable compound tail pages must have already been excluded by
|
||||
+ * exclude_range(), don't need to check them here.
|
||||
+ */
|
||||
+ if (compound_head & 1) {
|
||||
+ continue;
|
||||
+ }
|
||||
/*
|
||||
* Exclude the free page managed by a buddy
|
||||
* Use buddy identification of free pages whether cyclic or not.
|
||||
*/
|
||||
- if ((info->dump_level & DL_EXCLUDE_FREE)
|
||||
+ else if ((info->dump_level & DL_EXCLUDE_FREE)
|
||||
&& info->page_is_buddy
|
||||
&& info->page_is_buddy(flags, _mapcount, private, _count)) {
|
||||
nr_pages = 1 << private;
|
||||
diff --git a/makedumpfile.h b/makedumpfile.h
|
||||
index 5b35616eda37..9df16e3d2e02 100644
|
||||
--- a/makedumpfile.h
|
||||
+++ b/makedumpfile.h
|
||||
@@ -1485,6 +1485,7 @@ struct offset_table {
|
||||
long private;
|
||||
long compound_dtor;
|
||||
long compound_order;
|
||||
+ long compound_head;
|
||||
} page;
|
||||
struct mem_section {
|
||||
long section_mem_map;
|
||||
--
|
||||
2.9.0
|
||||
|
@ -14,15 +14,13 @@ start supporting both _count and _refcount in makedumpfile.
|
||||
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
|
||||
---
|
||||
makedumpfile.c | 26 +++++++++++++++++++++-----
|
||||
makedumpfile.h | 3 ++-
|
||||
makedumpfile.c | 26 +++++++++++++++++++++-----
|
||||
makedumpfile.h | 3 ++-
|
||||
2 files changed, 23 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/makedumpfile.c b/makedumpfile.c
|
||||
index fa0b779ab950..58cce3eb3d76 100644
|
||||
--- a/makedumpfile.c
|
||||
+++ b/makedumpfile.c
|
||||
@@ -1606,7 +1606,14 @@ get_structure_info(void)
|
||||
@@ -1579,7 +1579,14 @@ get_structure_info(void)
|
||||
*/
|
||||
SIZE_INIT(page, "page");
|
||||
OFFSET_INIT(page.flags, "page", "flags");
|
||||
@ -38,7 +36,7 @@ index fa0b779ab950..58cce3eb3d76 100644
|
||||
OFFSET_INIT(page.mapping, "page", "mapping");
|
||||
OFFSET_INIT(page._mapcount, "page", "_mapcount");
|
||||
OFFSET_INIT(page.private, "page", "private");
|
||||
@@ -2048,7 +2055,7 @@ get_mem_type(void)
|
||||
@@ -2044,7 +2051,7 @@ get_mem_type(void)
|
||||
|
||||
if ((SIZE(page) == NOT_FOUND_STRUCTURE)
|
||||
|| (OFFSET(page.flags) == NOT_FOUND_STRUCTURE)
|
||||
@ -47,7 +45,7 @@ index fa0b779ab950..58cce3eb3d76 100644
|
||||
|| (OFFSET(page.mapping) == NOT_FOUND_STRUCTURE)) {
|
||||
ret = NOT_FOUND_MEMTYPE;
|
||||
} else if ((((SYMBOL(node_data) != NOT_FOUND_SYMBOL)
|
||||
@@ -2155,7 +2162,10 @@ write_vmcoreinfo_data(void)
|
||||
@@ -2151,7 +2158,10 @@ write_vmcoreinfo_data(void)
|
||||
* write the member offset of 1st kernel
|
||||
*/
|
||||
WRITE_MEMBER_OFFSET("page.flags", page.flags);
|
||||
@ -59,7 +57,7 @@ index fa0b779ab950..58cce3eb3d76 100644
|
||||
WRITE_MEMBER_OFFSET("page.mapping", page.mapping);
|
||||
WRITE_MEMBER_OFFSET("page.lru", page.lru);
|
||||
WRITE_MEMBER_OFFSET("page._mapcount", page._mapcount);
|
||||
@@ -2490,7 +2500,13 @@ read_vmcoreinfo(void)
|
||||
@@ -2491,7 +2501,13 @@ read_vmcoreinfo(void)
|
||||
|
||||
|
||||
READ_MEMBER_OFFSET("page.flags", page.flags);
|
||||
@ -74,7 +72,7 @@ index fa0b779ab950..58cce3eb3d76 100644
|
||||
READ_MEMBER_OFFSET("page.mapping", page.mapping);
|
||||
READ_MEMBER_OFFSET("page.lru", page.lru);
|
||||
READ_MEMBER_OFFSET("page._mapcount", page._mapcount);
|
||||
@@ -5549,7 +5565,7 @@ __exclude_unnecessary_pages(unsigned long mem_map,
|
||||
@@ -5615,7 +5631,7 @@ __exclude_unnecessary_pages(unsigned lon
|
||||
pcache = page_cache + (index_pg * SIZE(page));
|
||||
|
||||
flags = ULONG(pcache + OFFSET(page.flags));
|
||||
@ -82,20 +80,18 @@ index fa0b779ab950..58cce3eb3d76 100644
|
||||
+ _count = UINT(pcache + OFFSET(page._refcount));
|
||||
mapping = ULONG(pcache + OFFSET(page.mapping));
|
||||
|
||||
if ((index_pg < PGMM_CACHED - 1) &&
|
||||
diff --git a/makedumpfile.h b/makedumpfile.h
|
||||
index e0b5bbf3dfc5..bc0d4218fe2a 100644
|
||||
if (OFFSET(page.compound_order) != NOT_FOUND_STRUCTURE) {
|
||||
--- a/makedumpfile.h
|
||||
+++ b/makedumpfile.h
|
||||
@@ -1097,6 +1097,7 @@ struct DumpInfo {
|
||||
int flag_use_printk_log; /* did we read printk_log symbol name? */
|
||||
@@ -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;
|
||||
@@ -1479,7 +1480,7 @@ struct size_table {
|
||||
@@ -1483,7 +1484,7 @@ struct size_table {
|
||||
struct offset_table {
|
||||
struct page {
|
||||
long flags;
|
||||
@ -104,6 +100,3 @@ index e0b5bbf3dfc5..bc0d4218fe2a 100644
|
||||
long mapping;
|
||||
long lru;
|
||||
long _mapcount;
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:47d16312b3226f6d1a1e6548e22c33d00e8851fedab793d97da8d3c0a6205d4a
|
||||
size 166881
|
3
makedumpfile-1.6.0.tar.gz
Normal file
3
makedumpfile-1.6.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e3147abc52df2ceac1e9affef45bf37e2f2e1d9979bc94a761ee11e4044072ac
|
||||
size 175080
|
32
makedumpfile-override-libtinfo.patch
Normal file
32
makedumpfile-override-libtinfo.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From: Petr Tesarik <ptesarik@suse.com>
|
||||
Subject: Allow to override the tinfo library used for eppic
|
||||
Patch-mainline: never; only needed for compatibility with older ncurses
|
||||
|
||||
Allow to override the "-ltinfo" linker option with a make variable.
|
||||
|
||||
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
||||
|
||||
---
|
||||
Makefile | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -67,6 +67,8 @@ LIBS := -lsnappy $(LIBS)
|
||||
CFLAGS += -DUSESNAPPY
|
||||
endif
|
||||
|
||||
+TINFOLIB = -ltinfo
|
||||
+
|
||||
LIBS := -lpthread $(LIBS)
|
||||
|
||||
all: makedumpfile
|
||||
@@ -90,7 +92,7 @@ makedumpfile: $(SRC_BASE) $(OBJ_PART) $(
|
||||
gzip -c ./makedumpfile.conf.5 > ./makedumpfile.conf.5.gz
|
||||
|
||||
eppic_makedumpfile.so: extension_eppic.c
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic -ltinfo
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -rdynamic -o $@ extension_eppic.c -fPIC -leppic ${TINFOLIB}
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(OBJ_PART) $(OBJ_ARCH) makedumpfile makedumpfile.8.gz makedumpfile.conf.5.gz
|
1
makedumpfile-rpmlintrc
Normal file
1
makedumpfile-rpmlintrc
Normal file
@ -0,0 +1 @@
|
||||
addFilter("devel-file-in-non-devel-package .*/usr/share/makedumpfile-1\.6\.0/eppic_scripts/.*\.c")
|
@ -1,3 +1,26 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 12 12:16:40 UTC 2016 - ptesarik@suse.com
|
||||
|
||||
- Silence rpmlint errors about devel files in non-devel package;
|
||||
despite their .c suffix, the provided eppic scripts are intended
|
||||
for production, not development.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 12 10:08:41 UTC 2016 - ptesarik@suse.com
|
||||
|
||||
- Build and install the eppic extension.
|
||||
- makedumpfile-override-libtinfo.patch: Allow to override the tinfo
|
||||
library used for eppic.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 12 09:13:25 UTC 2016 - ptesarik@suse.com
|
||||
|
||||
- Update to 1.6.0
|
||||
* Exclude page structures of non-dumped pages.
|
||||
- Drop upstreamed patch
|
||||
* Looking-for-page.compound_order-compound_dtor-.patch
|
||||
* Skip-examining-compound-tail-pages.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 8 08:50:40 UTC 2016 - mkubecek@suse.cz
|
||||
|
||||
|
@ -23,22 +23,29 @@
|
||||
%define have_snappy 0
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} < 1310 || 0%{?sles_version} < 12
|
||||
%define ncurses_make_opts TINFOLIB=-lncurses
|
||||
%endif
|
||||
|
||||
Name: makedumpfile
|
||||
Version: 1.5.9
|
||||
Version: 1.6.0
|
||||
Release: 0
|
||||
Summary: Partial kernel dump
|
||||
License: GPL-2.0
|
||||
Group: System/Kernel
|
||||
Url: https://sourceforge.net/projects/makedumpfile/
|
||||
Source: https://sourceforge.net/projects/makedumpfile/files/makedumpfile/%{version}/%{name}-%{version}.tar.gz
|
||||
Source99: %{name}-rpmlintrc
|
||||
Patch0: %{name}-coptflags.diff
|
||||
Patch1: Support-_count-_refcount-rename-in-struct-p.patch
|
||||
Patch2: Looking-for-page.compound_order-compound_dtor-.patch
|
||||
Patch3: Skip-examining-compound-tail-pages.patch
|
||||
Patch2: %{name}-override-libtinfo.patch
|
||||
BuildRequires: libdw-devel
|
||||
BuildRequires: libebl-devel
|
||||
BuildRequires: libelf-devel
|
||||
BuildRequires: libeppic-devel
|
||||
BuildRequires: lzo-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -63,19 +70,22 @@ via gdb or crash utility.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
%if %{have_snappy}
|
||||
export USESNAPPY=on
|
||||
%endif
|
||||
make %{?_smp_mflags} COPTFLAGS="%{optflags}" USELZO=on LINKTYPE=dynamic
|
||||
export USELZO=on
|
||||
export LINKTYPE=dynamic
|
||||
make %{?_smp_mflags} COPTFLAGS="%{optflags}" LDFLAGS="-Wl,-rpath,%{_libdir}/%{name}-%{version}"
|
||||
make %{?_smp_mflags} COPTFLAGS="%{optflags}" eppic_makedumpfile.so %{?ncurses_make_opts}
|
||||
|
||||
%install
|
||||
install -D -m 0755 makedumpfile %{buildroot}%{_bindir}/makedumpfile
|
||||
install -D -m 0755 makedumpfile-R.pl %{buildroot}%{_bindir}/makedumpfile-R.pl
|
||||
install -D -m 0644 makedumpfile.8 %{buildroot}%{_mandir}/man8/makedumpfile.8
|
||||
install -D -m 0644 makedumpfile.conf.5 %{buildroot}%{_mandir}/man5/makedumpfile.conf.5
|
||||
install -D -m 0755 eppic_makedumpfile.so %{buildroot}%{_libdir}/%{name}-%{version}/eppic_makedumpfile.so
|
||||
install -d -m 0755 %{buildroot}%{_datadir}/%{name}-%{version}/eppic_scripts
|
||||
install -m 0644 -t %{buildroot}%{_datadir}/%{name}-%{version}/eppic_scripts/ eppic_scripts/*
|
||||
|
||||
@ -84,6 +94,8 @@ install -m 0644 -t %{buildroot}%{_datadir}/%{name}-%{version}/eppic_scripts/ epp
|
||||
%doc README COPYING IMPLEMENTATION
|
||||
%{_mandir}/man?/*
|
||||
%{_bindir}/*
|
||||
%dir %{_libdir}/%{name}-%{version}
|
||||
%{_libdir}/%{name}-%{version}/eppic_makedumpfile.so
|
||||
%dir %{_datadir}/%{name}-%{version}
|
||||
%{_datadir}/%{name}-%{version}/eppic_scripts/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user