arm64/ptdump: Test both PTE_TABLE_BIT and PTE_VALID for block mappings
PATCH 1/1 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.
---
This patch applies on v6.12-rc6
arch/arm64/mm/ptdump.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/mm/ptdump.c +4 -4
@@ -80,10 +80,10 @@ static const struct ptdump_prot_bits pte_bits[] = { .set = "CON", .clear = " ", }, { - .mask = PTE_TABLE_BIT, - .val = PTE_TABLE_BIT, - .set = " ", - .clear = "BLK", + .mask = PTE_TABLE_BIT | PTE_VALID, + .val = PTE_VALID, + .set = "BLK", + .clear = " ", }, { .mask = PTE_UXN, .val = PTE_UXN,
Signature · 1 line
2.30.2
Quoted 6 lines · Anshuman Khandual
Test both
PTE_TABLE_BITandPTE_VALIDfor 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.
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64/ptdump: Test both PTE_TABLE_BIT and PTE_VALID for block mappings
https://git.kernel.org/arm64/c/dc9b74a76320
Signature · 1 line
Catalin