NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/55541: mmap(2) needs some updates
The following reply was made to PR kern/55541; it has been noted by GNATS.
From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/55541: mmap(2) needs some updates
Date: Wed, 5 Aug 2020 18:19:53 +0300
I'm not etnirely sure what your concern is.
On Tue, Aug 04, 2020 at 23:35:01 +0000, coypu%sdf.org@localhost wrote:
> If addr is non-zero, it is used as a hint to the system.
>
> Without conditionalizing this on MAP_FIXED.
I wonder if you are reading "MAP_FIXED" as implied by "hint" and then
think it's a bug that it's implied and not explicit. But I'm not sure
it is the case.
SUS says:
When MAP_FIXED is set in the flags argument, the implementation is
informed that the value of pa shall be addr, exactly. [...]
When MAP_FIXED is not set, the implementation uses addr in an
implementation-defined manner to arrive at pa. [...]
I think hint is vague^Wbroad enough to be just the right word here.
> 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.
As I said, I don't think "hint" is a problem in general. The bigger
problem here is IMO the phrase "normally protected" which is very
ambiguous.
-uwe
Home |
Main Index |
Thread Index |
Old Index