Date: Wed, 8 Aug 2012 05:28:31 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239137 - head/sys/amd64/amd64 Message-ID: <201208080528.q785SVnl047251@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208080528.q785SVnl047251>