From owner-freebsd-bugs@FreeBSD.ORG Tue Apr 13 22:34:42 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1FC216A4CE for ; Tue, 13 Apr 2004 22:34:42 -0700 (PDT) Received: from ns1.itga.com.au (ns1.itga.com.au [202.53.40.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34B5D43D48 for ; Tue, 13 Apr 2004 22:34:41 -0700 (PDT) (envelope-from gnb@itga.com.au) Received: from lightning.itga.com.au (lightning.itga.com.au [192.168.71.20]) by ns1.itga.com.au (8.12.9/8.12.9) with ESMTP id i3E5YDR5068496; Wed, 14 Apr 2004 15:34:13 +1000 (EST) (envelope-from gnb@itga.com.au) Received: from lightning.itga.com.au (localhost [127.0.0.1]) by lightning.itga.com.au (8.9.3/8.9.3) with ESMTP id PAA23575; Wed, 14 Apr 2004 15:34:12 +1000 (EST) Message-Id: <200404140534.PAA23575@lightning.itga.com.au> X-Mailer: exmh version 2.4 05/15/2001 with nmh-1.0.4 From: Gregory Bond To: "Mark W. Krentel" In-reply-to: Your message of Wed, 14 Apr 2004 00:41:23 -0400. Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 14 Apr 2004 15:34:12 +1000 Sender: gnb@itga.com.au cc: freebsd-bugs@freebsd.org Subject: Re: kern/64573: mmap with PROT_NONE, but still could be read X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2004 05:34:42 -0000 > The same bug happens mmap()-ing a file with PROT_WRITE, you still get > read access. In this case, PROT_NONE was just the simplest way to > demonstrate the bug. IIRC, in the original mmap man page lo these many years ago, there was a proviso about "hardware willing" (with the "PROT_WRITE implies PROT_READ" case explicitly mentioned). I wonder if the implementation still favours efficient implementation over semantic correctness, and if this proviso might be noted in the man page? Is it even possible to implement PROT_WRITE&~PROT_READ or PROT_NONE on i386?