From owner-svn-src-head@freebsd.org Sat Jan 2 23:14:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B6F6A5F71D; Sat, 2 Jan 2016 23:14:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FA7B1DCF; Sat, 2 Jan 2016 23:14:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u02NErvE050060; Sat, 2 Jan 2016 23:14:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u02NErHt050059; Sat, 2 Jan 2016 23:14:53 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201601022314.u02NErHt050059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 2 Jan 2016 23:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293065 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 02 Jan 2016 23:14:54 -0000 Author: ian Date: Sat Jan 2 23:14:52 2016 New Revision: 293065 URL: https://svnweb.freebsd.org/changeset/base/293065 Log: Reword the comment to better describe what I found while researching the problem that led to this temporary workaround (and also so I can properly cite the PR in the commit this time). In general this is intended to be a temporary workaround until we can figure out why including any ram from the last megabyte of the physical address space leads to a NULL pointer deref. Debugging that is made trickier by the fact that I couldn't even get a backtrace in ddb. PR: 201614 Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Sat Jan 2 22:55:59 2016 (r293064) +++ head/sys/arm/arm/physmem.c Sat Jan 2 23:14:52 2016 (r293065) @@ -282,16 +282,14 @@ arm_physmem_hardware_region(vm_paddr_t p * pmap_extract() == 0 means failure. * * Also filter out the page at the end of the physical address space -- - * if addr is non-zero and addr+size is zero that means we wrapped to - * the next byte beyond what vm_paddr_t can express. The calculations - * in vm_page_startup() are going to have the same problem, so just work - * around it by leaving the last page out. + * if addr is non-zero and addr+size is zero we wrapped to the next byte + * beyond what vm_paddr_t can express. That leads to a NULL pointer + * deref early in startup; work around it by leaving the last page out. * * XXX This just in: subtract out a whole megabyte, not just 1 page. - * Reducing the size by anything less than 1MB results in a NULL pointer - * deref in _vm_map_lock_read() very early in startup. Better to give - * up a whole megabyte than leave some folks with an unusable system - * while we investigate. + * Reducing the size by anything less than 1MB results in the NULL + * pointer deref in _vm_map_lock_read(). Better to give up a megabyte + * than leave some folks with an unusable system while we investigate. */ if (pa == 0) { pa = PAGE_SIZE;