From owner-svn-src-all@FreeBSD.ORG Sat Sep 20 14:24:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3598F88C; Sat, 20 Sep 2014 14:24:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14D98A6; Sat, 20 Sep 2014 14:24:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8KEOmve028023; Sat, 20 Sep 2014 14:24:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8KEOmXZ028021; Sat, 20 Sep 2014 14:24:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409201424.s8KEOmXZ028021@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 Sep 2014 14:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271905 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 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.18-1 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: Sat, 20 Sep 2014 14:24:49 -0000 Author: kib Date: Sat Sep 20 14:24:48 2014 New Revision: 271905 URL: http://svnweb.freebsd.org/changeset/base/271905 Log: MFC r271716: Presence of any VM_PROT bits in the permission argument on x86 implies that the entry is readable and valid. Approved by: re (gjb) Modified: stable/10/sys/amd64/amd64/pmap.c stable/10/sys/i386/i386/pmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Sat Sep 20 13:48:52 2014 (r271904) +++ stable/10/sys/amd64/amd64/pmap.c Sat Sep 20 14:24:48 2014 (r271905) @@ -3845,7 +3845,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sv pt_entry_t *pte, PG_G, PG_M, PG_RW, PG_V; boolean_t anychanged, pv_lists_locked; - if ((prot & VM_PROT_READ) == VM_PROT_NONE) { + KASSERT((prot & ~VM_PROT_ALL) == 0, ("invalid prot %x", prot)); + if (prot == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); return; } Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Sat Sep 20 13:48:52 2014 (r271904) +++ stable/10/sys/i386/i386/pmap.c Sat Sep 20 14:24:48 2014 (r271905) @@ -3161,7 +3161,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sv pt_entry_t *pte; boolean_t anychanged, pv_lists_locked; - if ((prot & VM_PROT_READ) == VM_PROT_NONE) { + KASSERT((prot & ~VM_PROT_ALL) == 0, ("invalid prot %x", prot)); + if (prot == VM_PROT_NONE) { pmap_remove(pmap, sva, eva); return; }