MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pmap_change_prot

Function pmap_change_prot

freebsd/amd64/amd64/pmap.c:9168–9182  ·  view source on GitHub ↗

* Changes the specified virtual address range's protections to those * specified by "prot". Like pmap_change_attr(), protections for aliases * in the direct map are updated as well. Protections on aliasing mappings may * be a subset of the requested protections; for example, mappings in the direct * map are never executable. */

Source from the content-addressed store, hash-verified

9166 * map are never executable.
9167 */
9168int
9169pmap_change_prot(vm_offset_t va, vm_size_t size, vm_prot_t prot)
9170{
9171 int error;
9172
9173 /* Only supported within the kernel map. */
9174 if (va < VM_MIN_KERNEL_ADDRESS)
9175 return (EINVAL);
9176
9177 PMAP_LOCK(kernel_pmap);
9178 error = pmap_change_props_locked(va, size, prot, -1,
9179 MAPDEV_ASSERTVALID);
9180 PMAP_UNLOCK(kernel_pmap);
9181 return (error);
9182}
9183
9184static int
9185pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot,

Callers 3

link_elf_protect_rangeFunction · 0.50
preload_protectFunction · 0.50
kmem_bootstrap_freeFunction · 0.50

Calls 1

pmap_change_props_lockedFunction · 0.85

Tested by

no test coverage detected