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

Function pmap_pkru_check_uargs

freebsd/amd64/amd64/pmap.c:11081–11094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11079}
11080
11081static int
11082pmap_pkru_check_uargs(pmap_t pmap, vm_offset_t sva, vm_offset_t eva,
11083 u_int keyidx, int flags)
11084{
11085
11086 if (pmap->pm_type != PT_X86 || keyidx > PMAP_MAX_PKRU_IDX ||
11087 (flags & ~(AMD64_PKRU_PERSIST | AMD64_PKRU_EXCL)) != 0)
11088 return (EINVAL);
11089 if (eva <= sva || eva > VM_MAXUSER_ADDRESS)
11090 return (EFAULT);
11091 if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) == 0)
11092 return (ENOTSUP);
11093 return (0);
11094}
11095
11096int
11097pmap_pkru_set(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, u_int keyidx,

Callers 2

pmap_pkru_setFunction · 0.85
pmap_pkru_clearFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected