Skip to content

Commit dc9b74a

Browse files
Anshuman Khandualctmarinas
authored andcommitted
arm64/ptdump: Test both PTE_TABLE_BIT and PTE_VALID for block mappings
Test both PTE_TABLE_BIT and PTE_VALID for block mappings, similar to KVM S2 ptdump. This ensures consistency in identifying block mappings, both in the S1 and the S2 page tables. Besides being kernel page tables, there will not be any unmapped (!PTE_VALID) block mappings. Cc: Will Deacon <will@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/20241105044154.4064181-1-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent baec239 commit dc9b74a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

arch/arm64/mm/ptdump.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ static const struct ptdump_prot_bits pte_bits[] = {
8080
.set = "CON",
8181
.clear = " ",
8282
}, {
83-
.mask = PTE_TABLE_BIT,
84-
.val = PTE_TABLE_BIT,
85-
.set = " ",
86-
.clear = "BLK",
83+
.mask = PTE_TABLE_BIT | PTE_VALID,
84+
.val = PTE_VALID,
85+
.set = "BLK",
86+
.clear = " ",
8787
}, {
8888
.mask = PTE_UXN,
8989
.val = PTE_UXN,

0 commit comments

Comments
 (0)