[PATCH] makedumpfile/arm: fix page_offset determination

Grzegorz Jaszczyk grzegorz.jaszczyk at linaro.org
Mon Jul 5 05:33:54 PDT 2021


When the CONFIG_STRICT_KERNEL_RWX is enabled for the armv7 kernel the
_stext is aligned to 1<<SECTION_SHIFT, which with hitherto code causes
wrong page_offset determination.

Suit mask used for page_offset in a way that it will allow to correctly
determine page_offset regardless of CONFIG_STRICT_KERNEL_RWX and
CONFIG_ARM_LPAE settings.

Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk at linaro.org>
---
 arch/arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm.c b/arch/arm.c
index 33536fc..7ae9cb1 100644
--- a/arch/arm.c
+++ b/arch/arm.c
@@ -80,7 +80,7 @@ get_phys_base_arm(void)
 int
 get_machdep_info_arm(void)
 {
-	info->page_offset = SYMBOL(_stext) & 0xffff0000UL;
+	info->page_offset = SYMBOL(_stext) & 0xffc00000UL;
 
 	/* Check if we can get MAX_PHYSMEM_BITS from vmcoreinfo */
 	if (NUMBER(MAX_PHYSMEM_BITS) != NOT_FOUND_NUMBER)
-- 
2.29.0




More information about the kexec mailing list