procfs_map.c (195840) | procfs_map.c (205014) |
---|---|
1/*- 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)procfs_status.c 8.3 (Berkeley) 2/17/94 34 * | 1/*- 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * Jan-Simon Pendry. 8 * --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)procfs_status.c 8.3 (Berkeley) 2/17/94 34 * |
35 * $FreeBSD: head/sys/fs/procfs/procfs_map.c 195840 2009-07-24 13:50:29Z jhb $ | 35 * $FreeBSD: head/sys/fs/procfs/procfs_map.c 205014 2010-03-11 14:49:06Z nwhitehorn $ |
36 */ 37 38#include "opt_compat.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/lock.h> 43#include <sys/filedesc.h> 44#include <sys/malloc.h> 45#include <sys/mount.h> 46#include <sys/mutex.h> 47#include <sys/proc.h> 48#include <sys/resourcevar.h> 49#include <sys/sbuf.h> | 36 */ 37 38#include "opt_compat.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/lock.h> 43#include <sys/filedesc.h> 44#include <sys/malloc.h> 45#include <sys/mount.h> 46#include <sys/mutex.h> 47#include <sys/proc.h> 48#include <sys/resourcevar.h> 49#include <sys/sbuf.h> |
50#ifdef COMPAT_IA32 | 50#ifdef COMPAT_FREEBSD32 |
51#include <sys/sysent.h> 52#endif 53#include <sys/uio.h> 54#include <sys/vnode.h> 55 56#include <fs/pseudofs/pseudofs.h> 57#include <fs/procfs/procfs.h> 58 --- 22 unchanged lines hidden (view full) --- 81 struct vmspace *vm; 82 vm_map_t map; 83 vm_map_entry_t entry, tmp_entry; 84 struct vnode *vp; 85 char *fullpath, *freepath; 86 struct uidinfo *uip; 87 int error, vfslocked; 88 unsigned int last_timestamp; | 51#include <sys/sysent.h> 52#endif 53#include <sys/uio.h> 54#include <sys/vnode.h> 55 56#include <fs/pseudofs/pseudofs.h> 57#include <fs/procfs/procfs.h> 58 --- 22 unchanged lines hidden (view full) --- 81 struct vmspace *vm; 82 vm_map_t map; 83 vm_map_entry_t entry, tmp_entry; 84 struct vnode *vp; 85 char *fullpath, *freepath; 86 struct uidinfo *uip; 87 int error, vfslocked; 88 unsigned int last_timestamp; |
89#ifdef COMPAT_IA32 | 89#ifdef COMPAT_FREEBSD32 |
90 int wrap32 = 0; 91#endif 92 93 PROC_LOCK(p); 94 error = p_candebug(td, p); 95 PROC_UNLOCK(p); 96 if (error) 97 return (error); 98 99 if (uio->uio_rw != UIO_READ) 100 return (EOPNOTSUPP); 101 | 90 int wrap32 = 0; 91#endif 92 93 PROC_LOCK(p); 94 error = p_candebug(td, p); 95 PROC_UNLOCK(p); 96 if (error) 97 return (error); 98 99 if (uio->uio_rw != UIO_READ) 100 return (EOPNOTSUPP); 101 |
102#ifdef COMPAT_IA32 | 102#ifdef COMPAT_FREEBSD32 |
103 if (curproc->p_sysent->sv_flags & SV_ILP32) { 104 if (!(p->p_sysent->sv_flags & SV_ILP32)) 105 return (EOPNOTSUPP); 106 wrap32 = 1; 107 } 108#endif 109 110 vm = vmspace_acquire_ref(p); --- 93 unchanged lines hidden (view full) --- 204 * format: 205 * start, end, resident, private resident, cow, access, type, 206 * charged, charged uid. 207 */ 208 error = sbuf_printf(sb, 209 "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s %s %d\n", 210 (u_long)e_start, (u_long)e_end, 211 resident, privateresident, | 103 if (curproc->p_sysent->sv_flags & SV_ILP32) { 104 if (!(p->p_sysent->sv_flags & SV_ILP32)) 105 return (EOPNOTSUPP); 106 wrap32 = 1; 107 } 108#endif 109 110 vm = vmspace_acquire_ref(p); --- 93 unchanged lines hidden (view full) --- 204 * format: 205 * start, end, resident, private resident, cow, access, type, 206 * charged, charged uid. 207 */ 208 error = sbuf_printf(sb, 209 "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s %s %d\n", 210 (u_long)e_start, (u_long)e_end, 211 resident, privateresident, |
212#ifdef COMPAT_IA32 | 212#ifdef COMPAT_FREEBSD32 |
213 wrap32 ? NULL : obj, /* Hide 64 bit value */ 214#else 215 obj, 216#endif 217 (e_prot & VM_PROT_READ)?"r":"-", 218 (e_prot & VM_PROT_WRITE)?"w":"-", 219 (e_prot & VM_PROT_EXECUTE)?"x":"-", 220 ref_count, shadow_count, flags, --- 26 unchanged lines hidden --- | 213 wrap32 ? NULL : obj, /* Hide 64 bit value */ 214#else 215 obj, 216#endif 217 (e_prot & VM_PROT_READ)?"r":"-", 218 (e_prot & VM_PROT_WRITE)?"w":"-", 219 (e_prot & VM_PROT_EXECUTE)?"x":"-", 220 ref_count, shadow_count, flags, --- 26 unchanged lines hidden --- |