Skip to content

Commit

Permalink
arm64: Disable L3C mappings for now
Browse files Browse the repository at this point in the history
These interact poorly with pmap_caploadgen_update().  Disable their creation for
now.
  • Loading branch information
markjdb committed Aug 15, 2024
1 parent bfa6f34 commit 05d86b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sys/arm64/arm64/pmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -5667,6 +5667,18 @@ pmap_enter_l3c(pmap_t pmap, vm_offset_t va, pt_entry_t l3e, u_int flags,
KASSERT(!VA_IS_CLEANMAP(va) || (l3e & ATTR_SW_MANAGED) == 0,
("pmap_enter_l3c: managed mapping within the clean submap"));

#ifdef CHERI_CAPREVOKE
if (!ADDR_IS_KERNEL(va)) {
/*
* pmap_caploadgen_update() currently does not handle L3C
* mappings. Avoid creating them at all on the basis that the
* pessimization of going through vm_fault() for capload faults
* is probably worse than not having L3C mappings at all.
*/
return (KERN_FAILURE);
}
#endif

/*
* If the L3 PTP is not resident, we attempt to create it here.
*/
Expand Down

0 comments on commit 05d86b4

Please sign in to comment.