Date: Thu, 21 May 2020 15:18:59 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r361333 - stable/12/sys/amd64/amd64 Message-ID: <202005211518.04LFIxOk062416@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu May 21 15:18:59 2020 New Revision: 361333 URL: https://svnweb.freebsd.org/changeset/base/361333 Log: MFC r361031: Assert that page table traversal functions don't operate on superpages. Modified: stable/12/sys/amd64/amd64/pmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/pmap.c ============================================================================== --- stable/12/sys/amd64/amd64/pmap.c Thu May 21 15:15:50 2020 (r361332) +++ stable/12/sys/amd64/amd64/pmap.c Thu May 21 15:18:59 2020 (r361333) @@ -1243,6 +1243,8 @@ pmap_pdpe_to_pde(pdp_entry_t *pdpe, vm_offset_t va) { pd_entry_t *pde; + KASSERT((*pdpe & PG_PS) == 0, + ("%s: pdpe %#lx is a leaf", __func__, *pdpe)); pde = (pd_entry_t *)PHYS_TO_DMAP(*pdpe & PG_FRAME); return (&pde[pmap_pde_index(va)]); } @@ -1267,6 +1269,8 @@ pmap_pde_to_pte(pd_entry_t *pde, vm_offset_t va) { pt_entry_t *pte; + KASSERT((*pde & PG_PS) == 0, + ("%s: pde %#lx is a leaf", __func__, *pde)); pte = (pt_entry_t *)PHYS_TO_DMAP(*pde & PG_FRAME); return (&pte[pmap_pte_index(va)]); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005211518.04LFIxOk062416>