Michael Kerrisk wrote:
tags 441387 fixed-upstream
thanks

Hello François,

Hello Michael,
The mprotect manpage specifies that:

"Whether PROT_EXEC has any effect different from PROT_READ is architecture and kernel version dependent."

which is true, but it should also specify that whether PROT_WRITE
implies PROT_READ is architecture dependant and that it is the case on
x86 platforms.

Yes, agreed.  I added a sentence:

    Whether PROT_EXEC has any effect different from  PROT_READ  is
    architecture  and  kernel version dependent.  On some hardware
    architectures (e.g., x86), PROT_WRITE implies PROT_READ.

The same holds true for the mmap manpage.

I also added a similar sentence to mmap(2).

Great !
However, what
makes this manpage especially misleading in that regard is that it
states that:

"For  example,  if the memory had previously been marked PROT_READ, and
mprotect() is then called with prot PROT_WRITE, it will no longer be
readable."

which, as I said, is not true on x86 platforms. I think would be better
to reverse this sentence so as to say:

"For  example,  if the memory had previously been marked PROT_WRITE, and
mprotect() is then called with prot PROT_READ, it will no longer be
writable."

I cannot find this text in the upstream man page (is it in mmap.2
or mprotect.2?).  Is this some text added by Debian?
Actually, the text can be found in the upstream mprotect.2 man page version 2.39 but it looks like it has been removed from the latest versions.

Thanks,
François
Cheers,

Michael




Reply via email to