From owner-svn-src-head@FreeBSD.ORG Wed Aug 8 05:28:31 2012 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 A8762106564A; Wed, 8 Aug 2012 05:28:31 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57C568FC08; Wed, 8 Aug 2012 05:28:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q785SVj1047253; Wed, 8 Aug 2012 05:28:31 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q785SVnl047251; Wed, 8 Aug 2012 05:28:31 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201208080528.q785SVnl047251@svn.freebsd.org> From: Alan Cox Date: Wed, 8 Aug 2012 05:28:31 +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: r239137 - head/sys/amd64/amd64 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: Wed, 08 Aug 2012 05:28:31 -0000 Author: alc Date: Wed Aug 8 05:28:30 2012 New Revision: 239137 URL: http://svn.freebsd.org/changeset/base/239137 Log: The assertion that I added in r238889 could legitimately fail when a debugger creates a breakpoint. Replace that assertion with a narrower one that still achieves my objective. Reported and tested by: kib Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Aug 8 04:28:45 2012 (r239136) +++ head/sys/amd64/amd64/pmap.c Wed Aug 8 05:28:30 2012 (r239137) @@ -3445,7 +3445,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%lx)", va)); - KASSERT((prot & access) == access, ("pmap_enter: access not in prot")); KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || va >= kmi.clean_eva, ("pmap_enter: managed mapping within the clean submap")); @@ -3458,6 +3457,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, newpte |= PG_M; if ((prot & VM_PROT_WRITE) != 0) newpte |= PG_RW; + KASSERT((newpte & (PG_M | PG_RW)) != PG_M, + ("pmap_enter: access includes VM_PROT_WRITE but prot doesn't")); if ((prot & VM_PROT_EXECUTE) == 0) newpte |= pg_nx; if (wired)