From owner-cvs-src@FreeBSD.ORG Fri Apr 23 20:46:45 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 002B616A4CE; Fri, 23 Apr 2004 20:46:44 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC60043D41; Fri, 23 Apr 2004 20:46:44 -0700 (PDT) (envelope-from alc@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i3O3kiGe055273; Fri, 23 Apr 2004 20:46:44 -0700 (PDT) (envelope-from alc@repoman.freebsd.org) Received: (from alc@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i3O3kipl055272; Fri, 23 Apr 2004 20:46:44 -0700 (PDT) (envelope-from alc) Message-Id: <200404240346.i3O3kipl055272@repoman.freebsd.org> From: Alan Cox Date: Fri, 23 Apr 2004 20:46:44 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/vm vm_map.c vm_map.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2004 03:46:45 -0000 alc 2004/04/23 20:46:44 PDT FreeBSD src repository Modified files: sys/vm vm_map.c vm_map.h Log: In cases where a file was resident in memory mmap(..., PROT_NONE, ...) would actually map the file with read access enabled. According to http://www.opengroup.org/onlinepubs/007904975/functions/mmap.html this is an error. Similarly, an madvise(..., MADV_WILLNEED) would enable read access on a virtual address range that was PROT_NONE. The solution implemented herein is (1) to pass a vm_prot_t to vm_map_pmap_enter() describing the allowed access and (2) to make vm_map_pmap_enter() responsible for understanding the limitations of pmap_enter_quick(). Submitted by: "Mark W. Krentel" PR: kern/64573 Revision Changes Path 1.333 +5 -4 src/sys/vm/vm_map.c 1.109 +1 -1 src/sys/vm/vm_map.h