NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/55541: mmap(2) needs some updates



>Number:         55541
>Category:       kern
>Synopsis:       mmap(2) needs some updates
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 04 23:35:00 +0000 2020
>Originator:     coypu
>Release:        NetBSD 9.99.69
>Organization:
>Environment:
NetBSD planets 9.99.69 NetBSD 9.99.69 (GENERIC) #1: Wed Aug  5 02:06:58 IDT 2020  fly@planets:/cvs/obj/sys/arch/amd64/compile/GENERIC amd64

>Description:
mmap(2) says:

If addr is non-zero, it is used as a hint to the system.

Without conditionalizing this on MAP_FIXED.

Additionally, the behaviour of MAP_TRYFIXED might be wrong from the actual behaviour. Two people recalled it as being "if the mapping already exists, fail", because MAP_FIXED unmaps the previous mapping.

The manual page, however, claims it would take "addr" as a hint in this situation.

Should confirm that the two people are right, then update the manual page for this.
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index