* 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. */
| 208 | * The process lock is not held here. |
| 209 | */ |
| 210 | void |
| 211 | mac_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 | |
| 227 | static __inline const char * |
| 228 | prot2str(vm_prot_t prot) |
no test coverage detected