Date: Tue, 4 Jun 2019 16:21:14 +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: r348630 - head/sys/amd64/amd64 Message-ID: <201906041621.x54GLEWf060854@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Tue Jun 4 16:21:14 2019 New Revision: 348630 URL: https://svnweb.freebsd.org/changeset/base/348630 Log: The changes to pmap_demote_pde_locked()'s control flow in r348476 resulted in the loss of a KASSERT that guarded against the invalidation a wired mapping. Restore this KASSERT. Remove an unnecessary KASSERT from pmap_demote_pde_locked(). It guards against a state that was already handled at the start of the function. Reviewed by: kib X-MFC with: r348476 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Jun 4 16:07:01 2019 (r348629) +++ head/sys/amd64/amd64/pmap.c Tue Jun 4 16:21:14 2019 (r348630) @@ -4565,6 +4565,8 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v * mapping was never accessed. */ if ((oldpde & PG_A) == 0) { + KASSERT((oldpde & PG_W) == 0, + ("pmap_demote_pde: a wired mapping is missing PG_A")); pmap_demote_pde_abort(pmap, va, pde, oldpde, lockp); return (FALSE); } @@ -4615,8 +4617,6 @@ pmap_demote_pde_locked(pmap_t pmap, pd_entry_t *pde, v mptepa = VM_PAGE_TO_PHYS(mpte); firstpte = (pt_entry_t *)PHYS_TO_DMAP(mptepa); newpde = mptepa | PG_M | PG_A | (oldpde & PG_U) | PG_RW | PG_V; - KASSERT((oldpde & PG_A) != 0, - ("pmap_demote_pde: oldpde is missing PG_A")); KASSERT((oldpde & (PG_M | PG_RW)) != PG_RW, ("pmap_demote_pde: oldpde is missing PG_M")); newpte = oldpde & ~PG_PS;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906041621.x54GLEWf060854>