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 <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Mark Rutland <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Anshuman Khandual <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent baec239 commit dc9b74a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)