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

Function pmap_pkru_clear

freebsd/amd64/amd64/pmap.c:11120–11141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11118}
11119
11120int
11121pmap_pkru_clear(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
11122{
11123 int error;
11124
11125 sva = trunc_page(sva);
11126 eva = round_page(eva);
11127 error = pmap_pkru_check_uargs(pmap, sva, eva, 0, 0);
11128 if (error != 0)
11129 return (error);
11130 for (;;) {
11131 PMAP_LOCK(pmap);
11132 error = pmap_pkru_deassign(pmap, sva, eva);
11133 if (error == 0)
11134 pmap_pkru_update_range(pmap, sva, eva, 0);
11135 PMAP_UNLOCK(pmap);
11136 if (error != ENOMEM)
11137 break;
11138 vm_wait(NULL);
11139 }
11140 return (error);
11141}
11142
11143/*
11144 * Track a range of the kernel's virtual address space that is contiguous

Callers 1

sysarchFunction · 0.85

Calls 4

pmap_pkru_check_uargsFunction · 0.85
pmap_pkru_deassignFunction · 0.85
pmap_pkru_update_rangeFunction · 0.85
vm_waitFunction · 0.85

Tested by

no test coverage detected