Date: Tue, 21 Oct 1997 13:13:23 -0500 (EST) From: "John S. Dyson" <toor@dyson.iquest.net> To: rantapaa@uswest.net (Erik E Rantapaa) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: PROT_READ needed for read() call? Message-ID: <199710211813.NAA02391@dyson.iquest.net> In-Reply-To: <Pine.BSF.3.91.971021105226.996A-100000@tahiti.oss.uswest.net> from Erik E Rantapaa at "Oct 21, 97 11:04:56 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Erik E Rantapaa said: > > 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. > As I remember, POSIX suggests/requires PROT_WRITE also imply PROT_READ. If it does, I'll correct the situation. (I have a copy of POSIX.) -- John dyson@freebsd.org jdyson@nc.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710211813.NAA02391>