Blame kexec-tools-2.0.22-makedumpfile-Increase-SECTION_MAP_LAST_BIT-to-5.patch

e2829b
From 646456862df8926ba10dd7330abf3bf0f887e1b6 Mon Sep 17 00:00:00 2001
e2829b
From: Kazuhito Hagio <k-hagio-ab@nec.com>
e2829b
Date: Wed, 26 May 2021 14:31:26 +0900
e2829b
Subject: [PATCH] Increase SECTION_MAP_LAST_BIT to 5
e2829b
e2829b
* Required for kernel 5.12
e2829b
e2829b
Kernel commit 1f90a3477df3 ("mm: teach pfn_to_online_page() about
e2829b
ZONE_DEVICE section collisions") added a section flag
e2829b
(SECTION_TAINT_ZONE_DEVICE) and causes makedumpfile an error on
e2829b
some machines like this:
e2829b
e2829b
  __vtop4_x86_64: Can't get a valid pmd_pte.
e2829b
  readmem: Can't convert a virtual address(ffffe2bdc2000000) to physical address.
e2829b
  readmem: type_addr: 0, addr:ffffe2bdc2000000, size:32768
e2829b
  __exclude_unnecessary_pages: Can't read the buffer of struct page.
e2829b
  create_2nd_bitmap: Can't exclude unnecessary pages.
e2829b
e2829b
Increase SECTION_MAP_LAST_BIT to 5 to fix this.  The bit had not
e2829b
been used until the change, so we can just increase the value.
e2829b
e2829b
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
e2829b
---
e2829b
 makedumpfile.h | 2 +-
e2829b
 1 file changed, 1 insertion(+), 1 deletion(-)
e2829b
e2829b
diff --git a/makedumpfile-1.6.9/makedumpfile.h b/makedumpfile-1.6.9/makedumpfile.h
e2829b
index 93aa774..79046f2 100644
e2829b
--- a/makedumpfile-1.6.9/makedumpfile.h
e2829b
+++ b/makedumpfile-1.6.9/makedumpfile.h
e2829b
@@ -195,7 +195,7 @@ isAnon(unsigned long mapping)
e2829b
  *  2. it has been verified that (1UL<<2) was never set, so it is
e2829b
  *     safe to mask that bit off even in old kernels.
e2829b
  */
e2829b
-#define SECTION_MAP_LAST_BIT	(1UL<<4)
e2829b
+#define SECTION_MAP_LAST_BIT	(1UL<<5)
e2829b
 #define SECTION_MAP_MASK	(~(SECTION_MAP_LAST_BIT-1))
e2829b
 #define NR_SECTION_ROOTS()	divideup(num_section, SECTIONS_PER_ROOT())
e2829b
 #define SECTION_NR_TO_PFN(sec)	((sec) << PFN_SECTION_SHIFT())
e2829b
-- 
e2829b
2.29.2
e2829b