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

From: Kyle Moffett
Date: Thu Oct 07 2004 - 20:19:56 EST


On Oct 07, 2004, at 17:58, Andries Brouwer wrote:
On Thu, Oct 07, 2004 at 03:50:31PM +0100, Alan Cox wrote:
"References
within the address range starting at pa and continuing for len bytes to
whole pages following the end of an object shall result in delivery of a
SIGBUS signal."

[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.]

The last bit of the SuS text means:

pa <-- len --> eof <-> page boundary

Anywhere from pa to page boundary will generate SIGBUS. This is a
rather useless definition no? I think what they meant is:

"References within the address range starting on the first whole page
at least len bytes after pa shall result in delivery of a SIGBUS signal."

(I am assuming, of course, that pa is the result of the mmap call. If I'm
wrong please tell me, thanks!)

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a17 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-)
------END GEEK CODE BLOCK------


-
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/