diff options
Diffstat (limited to 'sys/miscfs/procfs/procfs_mem.c')
-rw-r--r-- | sys/miscfs/procfs/procfs_mem.c | 87 |
1 files changed, 1 insertions, 86 deletions
diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c index baad123deb7..d5e33efc52e 100644 --- a/sys/miscfs/procfs/procfs_mem.c +++ b/sys/miscfs/procfs/procfs_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_mem.c,v 1.10 2000/08/15 02:44:12 ericj Exp $ */ +/* $OpenBSD: procfs_mem.c,v 1.11 2001/05/24 07:32:43 aaron Exp $ */ /* $NetBSD: procfs_mem.c,v 1.8 1996/02/09 22:40:50 christos Exp $ */ /* @@ -247,25 +247,6 @@ procfs_domem(curp, p, pfs, uio) } /* - * Given process (p), find the vnode from which - * it's text segment is being executed. - * - * It would be nice to grab this information from - * the VM system, however, there is no sure-fire - * way of doing that. Instead, fork(), exec() and - * wait() all maintain the p_textvp field in the - * process proc structure which contains a held - * reference to the exec'ed vnode. - */ -struct vnode * -procfs_findtextvp(p) - struct proc *p; -{ - - return (p->p_textvp); -} - -/* * Ensure that a process has permission to perform I/O on another. * Arguments: * p The process wishing to do the I/O (the tracer). @@ -299,69 +280,3 @@ procfs_checkioperm(p, t) return (0); } -#ifdef probably_never -/* - * Given process (p), find the vnode from which - * it's text segment is being mapped. - * - * (This is here, rather than in procfs_subr in order - * to keep all the VM related code in one place.) - */ -struct vnode * -procfs_findtextvp(p) - struct proc *p; -{ - int error; - vm_object_t object; - vm_offset_t pageno; /* page number */ - - /* find a vnode pager for the user address space */ - - for (pageno = VM_MIN_ADDRESS; - pageno < VM_MAXUSER_ADDRESS; - pageno += PAGE_SIZE) { - vm_map_t map; - vm_map_entry_t out_entry; - vm_prot_t out_prot; - boolean_t wired, single_use; - vm_offset_t off; - - map = &p->p_vmspace->vm_map; - error = vm_map_lookup(&map, pageno, - VM_PROT_READ, - &out_entry, &object, &off, &out_prot, - &wired, &single_use); - - if (!error) { - vm_pager_t pager; - - printf("procfs: found vm object\n"); - vm_map_lookup_done(map, out_entry); - printf("procfs: vm object = %p\n", object); - - /* - * At this point, assuming no errors, object - * is the VM object mapping UVA (pageno). - * Ensure it has a vnode pager, then grab - * the vnode from that pager's handle. - */ - - pager = object->pager; - printf("procfs: pager = %p\n", pager); - if (pager) - printf("procfs: found pager, type = %d\n", - pager->pg_type); - if (pager && pager->pg_type == PG_VNODE) { - struct vnode *vp; - - vp = (struct vnode *) pager->pg_handle; - printf("procfs: vp = %p\n", vp); - return (vp); - } - } - } - - printf("procfs: text object not found\n"); - return (0); -} -#endif /* probably_never */ |