Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 1997 11:04:56 -0500 (CDT)
From:      Erik E Rantapaa <rantapaa@uswest.net>
To:        freebsd-hackers@freebsd.org
Subject:   PROT_READ needed for read() call?
Message-ID:  <Pine.BSF.3.91.971021105226.996A-100000@tahiti.oss.uswest.net>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.971021105226.996A-100000>