Skip to content

Commit cd91b2f

Browse files
keesRussell King
authored andcommitted
ARM: 7963/1: mm: report both sections from PMD
On 2-level page table systems, the PMD has 2 section entries. Report these, otherwise ARM_PTDUMP will miss reporting permission changes on odd section boundaries. Signed-off-by: Kees Cook <[email protected]> Acked-by: Catalin Marinas <[email protected]> Tested-by: Steve Capper <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 39544ac commit cd91b2f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/arm/mm/dump.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start)
264264
note_page(st, addr, 3, pmd_val(*pmd));
265265
else
266266
walk_pte(st, pmd, addr);
267+
268+
if (SECTION_SIZE < PMD_SIZE && pmd_large(pmd[1]))
269+
note_page(st, addr + SECTION_SIZE, 3, pmd_val(pmd[1]));
267270
}
268271
}
269272

0 commit comments

Comments
 (0)