Re: mmap bug in 2.2.13 (or in documentation)

Rik van Riel (riel@nl.linux.org)
Wed, 29 Dec 1999 16:15:03 +0100 (CET)


On Wed, 29 Dec 1999, Jamie Lokier wrote:
> Abramo Bagnara wrote:
> > As I'm unable to understand why a file opened WR_ONLY cannot be mmap'ed
> > PROT_WRITE, MAP_SHARED I deduce that a break is missing at line 222.
>
> On some platforms (i386), PROT_WRITE is equivalent to PROT_READ |
> PROT_WRITE. The processor provides no mechanism for write-only access.

And on others you can only address memory in word sizes,
whereas some languages (C, for example) mandate access
on the byte or even bit level.

This means that you have to read a word first before you
can write a single byte, making the whole write-only
thing a pointless excercise.

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/