From owner-freebsd-hackers Tue Oct 21 09:05:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA20740 for hackers-outgoing; Tue, 21 Oct 1997 09:05:04 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from tahiti.oss.uswest.net (tahiti.oss.uswest.net [204.147.85.151]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA20721 for ; Tue, 21 Oct 1997 09:04:58 -0700 (PDT) (envelope-from rantapaa@uswest.net) Received: (from rantapaa@localhost) by tahiti.oss.uswest.net (8.8.5/8.6.12) id LAA05204; Tue, 21 Oct 1997 11:04:57 -0500 (CDT) Date: Tue, 21 Oct 1997 11:04:56 -0500 (CDT) From: Erik E Rantapaa To: freebsd-hackers@freebsd.org Subject: PROT_READ needed for read() call? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk While porting some code to FreeBSD 2.2-STABLE I noticed that in order to read() into a mmap-ed address space you need PROT_READ as well as PROT_WRITE, otherwise you get a "Bad address" error (EFAULT). The original code (Solaris) only requires PROT_WRITE. This is not a big deal, but I was wondering what the current thinking was on such issues. -- Erik Rantapaa rantapaa@math.umn.edu