Blame SOURCES/kexec-tools-2.0.20-makedumpfile-PATCH-Align-PMD_SECTION_MASK-with-PHYS_MASK.patch

73ea9d
From 7242ae4cb5288df626f464ced0a8b60fd669100b Mon Sep 17 00:00:00 2001
73ea9d
From: Michal Suchanek <msuchanek@suse.de>
73ea9d
Date: Mon, 16 Mar 2020 19:39:58 +0100
73ea9d
Subject: [PATCH 6/7] [PATCH] Align PMD_SECTION_MASK with PHYS_MASK
73ea9d
73ea9d
Reportedly on some arm64 systems makedumpfile loops forever exhausting
73ea9d
all memory when filtering kernel core. It turns out the reason is it
73ea9d
cannot resolve some addresses because the PMD mask is wrong. When
73ea9d
physical address mask allows up to 48bits pmd mask should allow the
73ea9d
same.
73ea9d
I suppose you would need a system that needs physical addresses over 1TB
73ea9d
to be able to reproduce this. This may be either because you have a lot
73ea9d
of memory or because the firmware mapped some memory above 1TB for some
73ea9d
reason.
73ea9d
73ea9d
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
73ea9d
---
73ea9d
 arch/arm64.c | 2 +-
73ea9d
 1 file changed, 1 insertion(+), 1 deletion(-)
73ea9d
73ea9d
diff --git a/makedumpfile-1.6.7/arch/arm64.c b/makedumpfile-1.6.7/arch/arm64.c
73ea9d
index 43164cc..54d60b4 100644
73ea9d
--- a/makedumpfile-1.6.7/arch/arm64.c
73ea9d
+++ b/makedumpfile-1.6.7/arch/arm64.c
73ea9d
@@ -81,7 +81,7 @@ static unsigned long kimage_voffset;
73ea9d
  * Remove the highest order bits that are not a part of the
73ea9d
  * physical address in a section
73ea9d
  */
73ea9d
-#define PMD_SECTION_MASK	((1UL << 40) - 1)
73ea9d
+#define PMD_SECTION_MASK	((1UL << PHYS_MASK_SHIFT) - 1)
73ea9d
 
73ea9d
 #define PMD_TYPE_MASK		3
73ea9d
 #define PMD_TYPE_SECT		1
73ea9d
-- 
73ea9d
2.7.5
73ea9d