Remove unneeded masks from the arm64 KASAN shadow
When mapping the arm64 KASAN shadow map we use Ln_TABLE_MASK to align physical addresses, however these should already be aligned either by rounding to a greater alignment, or the VM subsystem is giving us a correctly aligned page. Remove these extra alignment masks. Reviewed by: kevans Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D39752
This commit is contained in:
parent
6ed3b9ca25
commit
1bf4991bbc
@ -1241,8 +1241,7 @@ pmap_bootstrap_allocate_kasan_l2(vm_paddr_t start_pa, vm_paddr_t end_pa,
|
||||
continue;
|
||||
}
|
||||
|
||||
pmap_store(l2, (pa & ~Ln_TABLE_MASK) | PMAP_SAN_PTE_BITS |
|
||||
L2_BLOCK);
|
||||
pmap_store(l2, pa | PMAP_SAN_PTE_BITS | L2_BLOCK);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -7800,8 +7799,7 @@ pmap_san_enter(vm_offset_t va)
|
||||
MPASS(l1 != NULL);
|
||||
if ((pmap_load(l1) & ATTR_DESCR_VALID) == 0) {
|
||||
m = pmap_san_enter_alloc_l3();
|
||||
pmap_store(l1, (VM_PAGE_TO_PHYS(m) & ~Ln_TABLE_MASK) |
|
||||
L1_TABLE);
|
||||
pmap_store(l1, VM_PAGE_TO_PHYS(m) | L1_TABLE);
|
||||
}
|
||||
l2 = pmap_l1_to_l2(l1, va);
|
||||
if ((pmap_load(l2) & ATTR_DESCR_VALID) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user