From owner-svn-src-stable@freebsd.org Tue Dec 4 15:06:25 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4998D130F56E; Tue, 4 Dec 2018 15:06:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E19507CBFD; Tue, 4 Dec 2018 15:06:24 +0000 (UTC) (envelope-from kib@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C20D826D67; Tue, 4 Dec 2018 15:06:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wB4F6Ov7073654; Tue, 4 Dec 2018 15:06:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wB4F6O8S073653; Tue, 4 Dec 2018 15:06:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201812041506.wB4F6O8S073653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 4 Dec 2018 15:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341468 - stable/12/sys/amd64/amd64 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/amd64/amd64 X-SVN-Commit-Revision: 341468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E19507CBFD X-Spamd-Result: default: False [-0.87 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.56)[-0.556,0]; NEURAL_HAM_SHORT(-0.23)[-0.230,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-0.09)[-0.087,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2018 15:06:25 -0000 Author: kib Date: Tue Dec 4 15:06:24 2018 New Revision: 341468 URL: https://svnweb.freebsd.org/changeset/base/341468 Log: MFC r341096: Fix assert condition in pmap_large_unmap(). 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 Tue Dec 4 15:04:48 2018 (r341467) +++ stable/12/sys/amd64/amd64/pmap.c Tue Dec 4 15:06:24 2018 (r341468) @@ -8441,9 +8441,10 @@ pmap_large_unmap(void *svaa, vm_size_t len) KASSERT((va & PDPMASK) == 0, ("PDPMASK bit set, va %#lx pdpe %#lx pdp %#lx", va, (u_long)pdpe, pdp)); - KASSERT(len <= NBPDP, - ("len < NBPDP, sva %#lx va %#lx pdpe %#lx pdp %#lx " - "len %#lx", sva, va, (u_long)pdpe, pdp, len)); + KASSERT(va + NBPDP <= sva + len, + ("unmap covers partial 1GB page, sva %#lx va %#lx " + "pdpe %#lx pdp %#lx len %#lx", sva, va, + (u_long)pdpe, pdp, len)); *pdpe = 0; inc = NBPDP; continue; @@ -8457,9 +8458,10 @@ pmap_large_unmap(void *svaa, vm_size_t len) KASSERT((va & PDRMASK) == 0, ("PDRMASK bit set, va %#lx pde %#lx pd %#lx", va, (u_long)pde, pd)); - KASSERT(len <= NBPDR, - ("len < NBPDR, sva %#lx va %#lx pde %#lx pd %#lx " - "len %#lx", sva, va, (u_long)pde, pd, len)); + KASSERT(va + NBPDR <= sva + len, + ("unmap covers partial 2MB page, sva %#lx va %#lx " + "pde %#lx pd %#lx len %#lx", sva, va, (u_long)pde, + pd, len)); pde_store(pde, 0); inc = NBPDR; m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pde));