* 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. */
| 9166 | * map are never executable. |
| 9167 | */ |
| 9168 | int |
| 9169 | pmap_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 | |
| 9184 | static int |
| 9185 | pmap_change_props_locked(vm_offset_t va, vm_size_t size, vm_prot_t prot, |
no test coverage detected