From owner-freebsd-current Fri Mar 1 06:21:42 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA13138 for current-outgoing; Fri, 1 Mar 1996 06:21:42 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id GAA13130 for ; Fri, 1 Mar 1996 06:21:39 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id BAA17909; Sat, 2 Mar 1996 01:19:51 +1100 Date: Sat, 2 Mar 1996 01:19:51 +1100 From: Bruce Evans Message-Id: <199603011419.BAA17909@godzilla.zeta.org.au> To: current@FreeBSD.org, jkh@time.cdrom.com Subject: Re: pstat: cannot read swaplist: kvm_read: Bad address Sender: owner-current@FreeBSD.org Precedence: bulk >I now get this for pstat all the time, and I've recompiled all the >libs it depends on. The problem seems to be that /dev/kmem isn't all readable. Only the resident parts of it are. This is enforced by the following code in the memory driver: /* * Make sure that all of the pages are currently resident so * that we don't create any zero-fill pages. */ addr = trunc_page(uio->uio_offset); eaddr = round_page(uio->uio_offset + c); for (; addr < eaddr; addr += PAGE_SIZE) if (pmap_extract(kernel_pmap, addr) == 0) return EFAULT; The pages that I looked at could be read from kmem after I looked at them using ddb. The ones for the swap list seemed to be normal under ddb. Apparently looking at them right faults them in. Bruce