From owner-svn-src-head@FreeBSD.ORG Sun May 16 19:25:57 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56A10106564A; Sun, 16 May 2010 19:25:57 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4600A8FC16; Sun, 16 May 2010 19:25:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4GJPvlf092878; Sun, 16 May 2010 19:25:57 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4GJPvMu092877; Sun, 16 May 2010 19:25:57 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005161925.o4GJPvMu092877@svn.freebsd.org> From: Alan Cox Date: Sun, 16 May 2010 19:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208164 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2010 19:25:57 -0000 Author: alc Date: Sun May 16 19:25:56 2010 New Revision: 208164 URL: http://svn.freebsd.org/changeset/base/208164 Log: Correct an error of omission in r202897: Now that amd64 uses the direct map to access the message buffer, we must explicitly request that the underlying physical pages are included in a crash dump. Reported by: Benjamin Kaduk Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun May 16 19:01:32 2010 (r208163) +++ head/sys/vm/vm_page.c Sun May 16 19:25:56 2010 (r208164) @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -375,6 +376,19 @@ vm_page_startup(vm_offset_t vaddr) new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE); bzero((void *)vm_page_dump, vm_page_dump_size); #endif +#ifdef __amd64__ + /* + * Request that the physical pages underlying the message buffer be + * included in a crash dump. Since the message buffer is accessed + * through the direct map, they are not automatically included. + */ + pa = DMAP_TO_PHYS((vm_offset_t)msgbufp->msg_ptr); + last_pa = pa + round_page(MSGBUF_SIZE); + while (pa < last_pa) { + dump_add_page(pa); + pa += PAGE_SIZE; + } +#endif /* * Compute the number of pages of memory that will be available for * use (taking into account the overhead of a page structure per