From 500ee3d51f77cbd5c357c029313d6ebce1b4cae2b1dc544c065ff07811917a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Tue, 12 Jul 2016 12:37:06 +0000 Subject: [PATCH 1/4] Accepting request 407241 from home:mkubecek:branches:Kernel:kdump - fix compatibility with recent kernels (4.4 - 4.7) OBS-URL: https://build.opensuse.org/request/show/407241 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=95 --- ...r-page.compound_order-compound_dtor-.patch | 213 ++++++++++++++++++ Skip-examining-compound-tail-pages.patch | 120 ++++++++++ ...-_count-_refcount-rename-in-struct-p.patch | 109 +++++++++ makedumpfile.changes | 14 ++ makedumpfile.spec | 6 + 5 files changed, 462 insertions(+) create mode 100644 Looking-for-page.compound_order-compound_dtor-.patch create mode 100644 Skip-examining-compound-tail-pages.patch create mode 100644 Support-_count-_refcount-rename-in-struct-p.patch diff --git a/Looking-for-page.compound_order-compound_dtor-.patch b/Looking-for-page.compound_order-compound_dtor-.patch new file mode 100644 index 0000000..2171012 --- /dev/null +++ b/Looking-for-page.compound_order-compound_dtor-.patch @@ -0,0 +1,213 @@ +From: Atsushi Kumagai +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 +--- + 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 + diff --git a/Skip-examining-compound-tail-pages.patch b/Skip-examining-compound-tail-pages.patch new file mode 100644 index 0000000..45dda95 --- /dev/null +++ b/Skip-examining-compound-tail-pages.patch @@ -0,0 +1,120 @@ +From: Atsushi Kumagai +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 +--- + 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 + diff --git a/Support-_count-_refcount-rename-in-struct-p.patch b/Support-_count-_refcount-rename-in-struct-p.patch new file mode 100644 index 0000000..b861b53 --- /dev/null +++ b/Support-_count-_refcount-rename-in-struct-p.patch @@ -0,0 +1,109 @@ +From: Vitaly Kuznetsov +Date: Fri, 17 Jun 2016 18:41:26 +0900 +Subject: [PATCH v2] Support _count -> _refcount rename in struct page +Patch-mainline: Released-1-6-1? +Git-commit: 2c21d4656e8d3c2af2b1e14809d076941ae69e96 + +_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 + +--- + 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) + */ + 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"); +@@ -2048,7 +2055,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) +@@ -2155,7 +2162,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); +@@ -2490,7 +2500,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); +@@ -5549,7 +5565,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 ((index_pg < PGMM_CACHED - 1) && +diff --git a/makedumpfile.h b/makedumpfile.h +index e0b5bbf3dfc5..bc0d4218fe2a 100644 +--- a/makedumpfile.h ++++ b/makedumpfile.h +@@ -1097,6 +1097,7 @@ struct DumpInfo { + int flag_use_printk_log; /* did we read printk_log symbol name? */ + int flag_nospace; /* the flag of "No space on device" error */ + int flag_vmemmap; /* kernel supports vmemmap address space */ ++ 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 { + struct offset_table { + struct page { + long flags; +- long _count; ++ long _refcount; + long mapping; + long lru; + long _mapcount; +-- +2.9.0 + diff --git a/makedumpfile.changes b/makedumpfile.changes index b9ca791..626901c 100644 --- a/makedumpfile.changes +++ b/makedumpfile.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Fri Jul 8 08:50:40 UTC 2016 - mkubecek@suse.cz + +- Looking-for-page.compound_order-compound_dtor-.patch: + fix excluding hugepages (kernel 4.4 compatibility) +- Skip-examining-compound-tail-pages.patch + fix excluding compound tail pages (kernel 4.5 compatibility) + +------------------------------------------------------------------- +Fri Jul 8 05:57:04 UTC 2016 - mkubecek@suse.cz + +- Support-_count-_refcount-rename-in-struct-p.patch: + support 4.7 kernel (page._count renamed to page._refcount) + ------------------------------------------------------------------- Sun Feb 14 08:11:59 UTC 2016 - mpluskal@suse.com diff --git a/makedumpfile.spec b/makedumpfile.spec index bfef6f1..92cc5f5 100644 --- a/makedumpfile.spec +++ b/makedumpfile.spec @@ -32,6 +32,9 @@ Group: System/Kernel Url: https://sourceforge.net/projects/makedumpfile/ Source: https://sourceforge.net/projects/makedumpfile/files/makedumpfile/%{version}/%{name}-%{version}.tar.gz 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 BuildRequires: libdw-devel BuildRequires: libebl-devel BuildRequires: libelf-devel @@ -58,6 +61,9 @@ via gdb or crash utility. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %if %{have_snappy} From 56b3fbcf375bb8221b4d43ce6d9e5dadcc8b1654fa1423aa536482b0e51bc41c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Tue, 12 Jul 2016 14:24:05 +0000 Subject: [PATCH 2/4] 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 --- ...r-page.compound_order-compound_dtor-.patch | 213 ------------------ Skip-examining-compound-tail-pages.patch | 120 ---------- ...-_count-_refcount-rename-in-struct-p.patch | 29 +-- makedumpfile-1.5.9.tar.gz | 3 - makedumpfile-1.6.0.tar.gz | 3 + makedumpfile-override-libtinfo.patch | 32 +++ makedumpfile-rpmlintrc | 1 + makedumpfile.changes | 23 ++ makedumpfile.spec | 22 +- 9 files changed, 87 insertions(+), 359 deletions(-) delete mode 100644 Looking-for-page.compound_order-compound_dtor-.patch delete mode 100644 Skip-examining-compound-tail-pages.patch delete mode 100644 makedumpfile-1.5.9.tar.gz create mode 100644 makedumpfile-1.6.0.tar.gz create mode 100644 makedumpfile-override-libtinfo.patch create mode 100644 makedumpfile-rpmlintrc diff --git a/Looking-for-page.compound_order-compound_dtor-.patch b/Looking-for-page.compound_order-compound_dtor-.patch deleted file mode 100644 index 2171012..0000000 --- a/Looking-for-page.compound_order-compound_dtor-.patch +++ /dev/null @@ -1,213 +0,0 @@ -From: Atsushi Kumagai -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 ---- - 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 - diff --git a/Skip-examining-compound-tail-pages.patch b/Skip-examining-compound-tail-pages.patch deleted file mode 100644 index 45dda95..0000000 --- a/Skip-examining-compound-tail-pages.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: Atsushi Kumagai -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 ---- - 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 - diff --git a/Support-_count-_refcount-rename-in-struct-p.patch b/Support-_count-_refcount-rename-in-struct-p.patch index b861b53..ee179d6 100644 --- a/Support-_count-_refcount-rename-in-struct-p.patch +++ b/Support-_count-_refcount-rename-in-struct-p.patch @@ -14,15 +14,13 @@ start supporting both _count and _refcount in makedumpfile. Signed-off-by: Vitaly Kuznetsov --- - 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 - diff --git a/makedumpfile-1.5.9.tar.gz b/makedumpfile-1.5.9.tar.gz deleted file mode 100644 index 601501e..0000000 --- a/makedumpfile-1.5.9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47d16312b3226f6d1a1e6548e22c33d00e8851fedab793d97da8d3c0a6205d4a -size 166881 diff --git a/makedumpfile-1.6.0.tar.gz b/makedumpfile-1.6.0.tar.gz new file mode 100644 index 0000000..f808109 --- /dev/null +++ b/makedumpfile-1.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3147abc52df2ceac1e9affef45bf37e2f2e1d9979bc94a761ee11e4044072ac +size 175080 diff --git a/makedumpfile-override-libtinfo.patch b/makedumpfile-override-libtinfo.patch new file mode 100644 index 0000000..22b5a70 --- /dev/null +++ b/makedumpfile-override-libtinfo.patch @@ -0,0 +1,32 @@ +From: Petr Tesarik +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 + +--- + 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 diff --git a/makedumpfile-rpmlintrc b/makedumpfile-rpmlintrc new file mode 100644 index 0000000..d139c39 --- /dev/null +++ b/makedumpfile-rpmlintrc @@ -0,0 +1 @@ +addFilter("devel-file-in-non-devel-package .*/usr/share/makedumpfile-1\.6\.0/eppic_scripts/.*\.c") diff --git a/makedumpfile.changes b/makedumpfile.changes index 626901c..0b5fcf4 100644 --- a/makedumpfile.changes +++ b/makedumpfile.changes @@ -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 diff --git a/makedumpfile.spec b/makedumpfile.spec index 92cc5f5..d91df28 100644 --- a/makedumpfile.spec +++ b/makedumpfile.spec @@ -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/ From f6bbd2e21956869fa420e039f11b113400332e9cd3bda4bb8133c4774da58efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Tue, 12 Jul 2016 15:57:21 +0000 Subject: [PATCH 3/4] - Rename Support-_count-_refcount-rename-in-struct-p.patch to makedumpfile-_count-_refcount-rename.patch. OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=97 --- ...ct-p.patch => makedumpfile-_count-_refcount-rename.patch | 0 makedumpfile.changes | 6 ++++++ makedumpfile.spec | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) rename Support-_count-_refcount-rename-in-struct-p.patch => makedumpfile-_count-_refcount-rename.patch (100%) diff --git a/Support-_count-_refcount-rename-in-struct-p.patch b/makedumpfile-_count-_refcount-rename.patch similarity index 100% rename from Support-_count-_refcount-rename-in-struct-p.patch rename to makedumpfile-_count-_refcount-rename.patch diff --git a/makedumpfile.changes b/makedumpfile.changes index 0b5fcf4..dbe1b9f 100644 --- a/makedumpfile.changes +++ b/makedumpfile.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 12 15:56:04 UTC 2016 - ptesarik@suse.com + +- Rename Support-_count-_refcount-rename-in-struct-p.patch to + makedumpfile-_count-_refcount-rename.patch. + ------------------------------------------------------------------- Tue Jul 12 12:16:40 UTC 2016 - ptesarik@suse.com diff --git a/makedumpfile.spec b/makedumpfile.spec index d91df28..4815883 100644 --- a/makedumpfile.spec +++ b/makedumpfile.spec @@ -38,7 +38,7 @@ 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 +Patch1: %{name}-_count-_refcount-rename.patch Patch2: %{name}-override-libtinfo.patch BuildRequires: libdw-devel BuildRequires: libebl-devel @@ -49,7 +49,7 @@ BuildRequires: ncurses-devel BuildRequires: xz-devel BuildRequires: zlib-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build -ExclusiveArch: %ix86 x86_64 ia64 ppc ppc64 ppc64le s390x %arm aarch64 +ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 ppc64le s390x %{arm} aarch64 %if 0%{?suse_version} >= 1140 || 0%{?sles_version} >= 11 BuildRequires: libbz2-devel %else From a3846ac79bc353363f937a2e2fe68fd4d03733160d67ca81b8fe431ff5c33dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Wed, 13 Jul 2016 10:39:45 +0000 Subject: [PATCH 4/4] Fix the condition for -ltinfo. OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/makedumpfile?expand=0&rev=98 --- makedumpfile.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makedumpfile.spec b/makedumpfile.spec index 4815883..121004d 100644 --- a/makedumpfile.spec +++ b/makedumpfile.spec @@ -24,7 +24,7 @@ %endif %endif -%if 0%{?suse_version} < 1310 || 0%{?sles_version} < 12 +%if 0%{?suse_version} < 1310 && 0%{?sles_version} < 12 %define ncurses_make_opts TINFOLIB=-lncurses %endif