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

Function mac_proc_vm_revoke

freebsd/security/mac/mac_process.c:210–225  ·  view source on GitHub ↗

* When relabeling a process, call out to the policies for the maximum * permission allowed for each object type we know about in its memory space, * and revoke access (in the least surprising ways we know) when necessary. * The process lock is not held here. */

Source from the content-addressed store, hash-verified

208 * The process lock is not held here.
209 */
210void
211mac_proc_vm_revoke(struct thread *td)
212{
213 struct ucred *cred;
214
215 PROC_LOCK(td->td_proc);
216 cred = crhold(td->td_proc->p_ucred);
217 PROC_UNLOCK(td->td_proc);
218
219 /* XXX freeze all other threads */
220 mac_proc_vm_revoke_recurse(td, cred,
221 &td->td_proc->p_vmspace->vm_map);
222 /* XXX allow other threads to continue */
223
224 crfree(cred);
225}
226
227static __inline const char *
228prot2str(vm_prot_t prot)

Callers 2

sys___mac_set_procFunction · 0.85
lomac_thread_userretFunction · 0.85

Calls 3

crholdFunction · 0.50
crfreeFunction · 0.50

Tested by

no test coverage detected