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

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