Subject: kern/7935: mmap(2) API incompletely documented
To: None <gnats-bugs@gnats.netbsd.org>
From: None <perry@piermont.com>
List: netbsd-bugs
Date: 07/06/1999 11:06:19
>Number:         7935
>Category:       kern
>Synopsis:       mmap(2) API incompletely documented
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul  6 11:05:01 1999
>Last-Modified:
>Originator:     Perry E. Metzger
>Organization:
Perry Metzger		perry@piermont.com
--
"Ask not what your country can force other people to do for you."
>Release:        NetBSD-current
>Environment:
	
System: NetBSD jekyll.piermont.com 1.4 NetBSD 1.4 (JEKYLL) #0: Mon May 3 09:58:15 EDT 1999 perry@jekyll.piermont.com:/usr/src/sys/arch/i386/compile/JEKYLL i386


>Description:

Over ICB last night, cgd indicated to me that if you request a chunk
of anonymous mmap'ed memory, it is guaranteed that this memory will be 
handed to you in the region above the highest address that the BSS
segment can ever occupy, and thus mmap use will never interfere with
sbrk'ed memory.

I tried to find documentation for this and could not. Further, I tried 
examining the XPG documents to find out what mmap's documented
behavior is in the standards -- at best, they are completely vague.

This API has to be fully documented.

>How-To-Repeat:

Talk to various people. type "man mmap" and lots of other stuff. file a pr.

>Fix:

Thor makes a weird claim that some of this may be documented in the
POSIX realtime extensions documents -- if so, we should follow those
standards. Otherwise, we have to both completely specify what this
stuff is supposed to do and document it.
>Audit-Trail:
>Unformatted: