Re: mmap specification - was: ... select specification

From: Chris Wedgwood
Date: Thu Oct 07 2004 - 17:25:30 EST


On Thu, Oct 07, 2004 at 11:58:34PM +0200, Andries Brouwer wrote:

> [I read this as follows: If you mmap a file with MAP_SHARED and
> modify the memory at an address so far beyond EOF that it is not in
> a page containing stuff from the file, then you get a SIGBUS. --
> Linux does this. Also, that if you modify the memory at an address
> beyond EOF, then the file is not modified. -- Again Linux does
> this.]

consider mmaping a 1-byte file ... you can modify bytes 0..4095.
bytes 1..4095 shouldn't be recorded to disk ideally

at one point one fs did actually store this data and it caused cpp
problems (it would expect to see zeroes and where it didn't it got
upset)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/