Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/link_elf_obj.c
Show First 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | |||||
#ifdef __amd64__ | #ifdef __amd64__ | ||||
error = pmap_change_prot(start, end - start, prot); | error = pmap_change_prot(start, end - start, prot); | ||||
KASSERT(error == 0, | KASSERT(error == 0, | ||||
("link_elf_protect_range: pmap_change_prot() returned %d", | ("link_elf_protect_range: pmap_change_prot() returned %d", | ||||
error)); | error)); | ||||
#endif | #endif | ||||
return; | return; | ||||
} | } | ||||
error = vm_map_protect(kernel_map, start, end, prot, FALSE); | error = vm_map_protect(kernel_map, start, end, prot, 0, | ||||
VM_MAP_PROTECT_SET_PROT); | |||||
KASSERT(error == KERN_SUCCESS, | KASSERT(error == KERN_SUCCESS, | ||||
("link_elf_protect_range: vm_map_protect() returned %d", error)); | ("link_elf_protect_range: vm_map_protect() returned %d", error)); | ||||
} | } | ||||
/* | /* | ||||
* Restrict permissions on linker file memory based on section flags. | * Restrict permissions on linker file memory based on section flags. | ||||
* Sections need not be page-aligned, so overlap within a page is possible. | * Sections need not be page-aligned, so overlap within a page is possible. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,516 Lines • Show Last 20 Lines |