diff -Nru makedumpfile-1.6.6/debian/changelog makedumpfile-1.6.6/debian/changelog --- makedumpfile-1.6.6/debian/changelog 2019-12-18 14:38:51.000000000 -0300 +++ makedumpfile-1.6.6/debian/changelog 2020-01-03 16:58:16.000000000 -0300 @@ -1,3 +1,11 @@ +makedumpfile (1:1.6.6-4ubuntu2) focal; urgency=medium + + * x86_64: Fix an error due to makedumpfile being out-of-sync with recent + kernels. To achieve that, add the following patch: "Increase + SECTION_MAP_LAST_BIT to 4". (LP: #1857616) + + -- Guilherme G. Piccoli Fri, 03 Jan 2020 16:57:00 -0300 + makedumpfile (1:1.6.6-4ubuntu1) focal; urgency=medium [ Thadeu Lima de Souza Cascardo ] diff -Nru makedumpfile-1.6.6/debian/patches/0003-Increase-SECTION_MAP_LAST_BIT-to-4.patch makedumpfile-1.6.6/debian/patches/0003-Increase-SECTION_MAP_LAST_BIT-to-4.patch --- makedumpfile-1.6.6/debian/patches/0003-Increase-SECTION_MAP_LAST_BIT-to-4.patch 1969-12-31 21:00:00.000000000 -0300 +++ makedumpfile-1.6.6/debian/patches/0003-Increase-SECTION_MAP_LAST_BIT-to-4.patch 2020-01-03 16:55:52.000000000 -0300 @@ -0,0 +1,37 @@ +Author: Kazuhito Hagio +Date: Tue, 23 Jul 2019 12:24:47 -0400 +Subject: Increase SECTION_MAP_LAST_BIT to 4 + +kernel commit 326e1b8f83a4 ("mm/sparsemem: introduce a SECTION_IS_EARLY +flag") added the flag to mem_section->section_mem_map value, and it caused +makedumpfile an error like the following: + + readmem: Can't convert a virtual address(fffffc97d1000000) to physical address. + readmem: type_addr: 0, addr:fffffc97d1000000, size:32768 + __exclude_unnecessary_pages: Can't read the buffer of struct page. + create_2nd_bitmap: Can't exclude unnecessary pages. + +To fix this, SECTION_MAP_LAST_BIT needs to be updated. The bit has not +been used until the addition, so we can just increase the value. + +Signed-off-by: Kazuhito Hagio +--- + makedumpfile.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/makedumpfile.h b/makedumpfile.h +index 24b2f69..df745b9 100644 +--- a/makedumpfile.h ++++ b/makedumpfile.h +@@ -195,7 +195,7 @@ isAnon(unsigned long mapping) + * 2. it has been verified that (1UL<<2) was never set, so it is + * safe to mask that bit off even in old kernels. + */ +-#define SECTION_MAP_LAST_BIT (1UL<<3) ++#define SECTION_MAP_LAST_BIT (1UL<<4) + #define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1)) + #define NR_SECTION_ROOTS() divideup(num_section, SECTIONS_PER_ROOT()) + #define SECTION_NR_TO_PFN(sec) ((sec) << PFN_SECTION_SHIFT()) +-- +2.24.0 + diff -Nru makedumpfile-1.6.6/debian/patches/series makedumpfile-1.6.6/debian/patches/series --- makedumpfile-1.6.6/debian/patches/series 2019-12-18 14:38:51.000000000 -0300 +++ makedumpfile-1.6.6/debian/patches/series 2020-01-03 16:55:52.000000000 -0300 @@ -1,2 +1,3 @@ 0001-Remove-libebl-linkage.patch 0002-adapt-makefile-to-debian.patch +0003-Increase-SECTION_MAP_LAST_BIT-to-4.patch