From owner-freebsd-current@FreeBSD.ORG Mon Aug 20 18:21:34 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E81C106567A for ; Mon, 20 Aug 2012 18:21:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4518FC16 for ; Mon, 20 Aug 2012 18:21:34 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 93F15B941; Mon, 20 Aug 2012 14:21:33 -0400 (EDT) From: John Baldwin To: Monthadar Al Jaberi Date: Mon, 20 Aug 2012 12:15:58 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201208200804.31932.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208201215.58033.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 20 Aug 2012 14:21:33 -0400 (EDT) Cc: freebsd-current@freebsd.org Subject: Re: kernel page fult for a valid pointer? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 18:21:34 -0000 On Monday, August 20, 2012 9:49:48 am Monthadar Al Jaberi wrote: > On Mon, Aug 20, 2012 at 2:04 PM, John Baldwin wrote: > > On Saturday, August 18, 2012 2:29:26 pm Monthadar Al Jaberi wrote: > >> Hi, > >> > >> I am wondering is there a reason for getting "Fatal trap 12: page > >> fault while in kernel mode" "supervisor read, page not present" for an > >> address used to be valid in kernel space? > >> > >> I dont really understand why I am getting this, I added a hardware > >> watchpoint on the address, and when I got to the debuger I could read > >> the memory content and dump for that address. But when I continue from > >> the debugger I get the panic and now when I try to read the memory > >> content I get *** error reading from address ce733000 ***. > > > > Whatever memory was there might have been unmapped? For example, > > memory pointed to by I/O buffers (struct buf/bio) use transient > > mappings that are only valid while an I/O request is in progress. > > Thank you the for the reply, so if a struct gets freed will the page > it was on get un-mapped, so that I cant dump it in debugger? Even > VirtualBox debugger cant dump the memory giving > "VERR_PAGE_TABLE_NOT_PRESENT: Reading memory at...". > > In my case it is a struct ieee80211_node which gets freed, but where > does the page get unmaped? I tried doubling the memory in VirtualBox. Well, things that are malloc'd are a bit trickier. I do believe they can get unmapped if the backing slab is released to the system during a uma_reclaim(). -- John Baldwin