From owner-svn-src-all@freebsd.org Tue Jul 21 14:17:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C55035DD1C; Tue, 21 Jul 2020 14:17:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BB0zj2hPVz3S1q; Tue, 21 Jul 2020 14:17:37 +0000 (UTC) (envelope-from markj@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 407AE1F4CC; Tue, 21 Jul 2020 14:17:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06LEHbKX005472; Tue, 21 Jul 2020 14:17:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06LEHZtv005464; Tue, 21 Jul 2020 14:17:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007211417.06LEHZtv005464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 21 Jul 2020 14:17:35 +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: r363389 - in stable/12/sys: amd64/amd64 i386/i386 mips/mips powerpc/aim powerpc/booke X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 i386/i386 mips/mips powerpc/aim powerpc/booke X-SVN-Commit-Revision: 363389 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2020 14:17:37 -0000 Author: markj Date: Tue Jul 21 14:17:35 2020 New Revision: 363389 URL: https://svnweb.freebsd.org/changeset/base/363389 Log: MFC r363266 (by cem): Revert r240317 to prevent leaking pmap entries Modified: stable/12/sys/amd64/amd64/pmap.c stable/12/sys/i386/i386/pmap.c stable/12/sys/mips/mips/pmap.c stable/12/sys/powerpc/aim/mmu_oea.c stable/12/sys/powerpc/aim/mmu_oea64.c stable/12/sys/powerpc/booke/pmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/pmap.c ============================================================================== --- stable/12/sys/amd64/amd64/pmap.c Tue Jul 21 13:50:10 2020 (r363388) +++ stable/12/sys/amd64/amd64/pmap.c Tue Jul 21 14:17:35 2020 (r363389) @@ -7991,8 +7991,10 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size) return; } } - if (pmap_initialized) + if (pmap_initialized) { + pmap_qremove(va, atop(size)); kva_free(va, size); + } } /* Modified: stable/12/sys/i386/i386/pmap.c ============================================================================== --- stable/12/sys/i386/i386/pmap.c Tue Jul 21 13:50:10 2020 (r363388) +++ stable/12/sys/i386/i386/pmap.c Tue Jul 21 14:17:35 2020 (r363389) @@ -5600,8 +5600,10 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size) return; } } - if (pmap_initialized) + if (pmap_initialized) { + pmap_qremove(va, atop(size)); kva_free(va, size); + } } /* Modified: stable/12/sys/mips/mips/pmap.c ============================================================================== --- stable/12/sys/mips/mips/pmap.c Tue Jul 21 13:50:10 2020 (r363388) +++ stable/12/sys/mips/mips/pmap.c Tue Jul 21 14:17:35 2020 (r363389) @@ -3276,6 +3276,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size) base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(size + offset, PAGE_SIZE); + pmap_qremove(base, atop(size)); kva_free(base, size); #endif } Modified: stable/12/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/12/sys/powerpc/aim/mmu_oea.c Tue Jul 21 13:50:10 2020 (r363388) +++ stable/12/sys/powerpc/aim/mmu_oea.c Tue Jul 21 14:17:35 2020 (r363389) @@ -2682,6 +2682,7 @@ moea_unmapdev(mmu_t mmu, vm_offset_t va, vm_size_t siz base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); + moea_qremove(base, atop(size)); kva_free(base, size); } } Modified: stable/12/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/12/sys/powerpc/aim/mmu_oea64.c Tue Jul 21 13:50:10 2020 (r363388) +++ stable/12/sys/powerpc/aim/mmu_oea64.c Tue Jul 21 14:17:35 2020 (r363389) @@ -2794,6 +2794,7 @@ moea64_unmapdev(mmu_t mmu, vm_offset_t va, vm_size_t s offset = va & PAGE_MASK; size = roundup2(offset + size, PAGE_SIZE); + moea64_qremove(base, atop(size)); kva_free(base, size); } Modified: stable/12/sys/powerpc/booke/pmap.c ============================================================================== --- stable/12/sys/powerpc/booke/pmap.c Tue Jul 21 13:50:10 2020 (r363388) +++ stable/12/sys/powerpc/booke/pmap.c Tue Jul 21 14:17:35 2020 (r363389) @@ -3686,6 +3686,7 @@ mmu_booke_unmapdev(mmu_t mmu, vm_offset_t va, vm_size_ base = trunc_page(va); offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); + mmu_booke_qremove(base, atop(size)); kva_free(base, size); } #endif