Debian Bug report logs -
#441387
Misleading mprotect manpage
Reported by: François Diakhate <diakhate@enseirb.fr>
Date: Sun, 9 Sep 2007 11:39:06 UTC
Severity: normal
Tags: fixed-upstream
Found in version manpages/2.39-1
Done: Martin Schulze <joey@infodrom.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#441387; Package manpages-dev.
(full text, mbox, link).
Acknowledgement sent to François Diakhate <diakhate@enseirb.fr>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: manpages-dev
Version: 2.39-1
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. The same holds true for the mmap manpage. 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."
Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#441387; Package manpages-dev.
(full text, mbox, link).
Acknowledgement sent to Michael Kerrisk <mtk-manpages@gmx.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>.
(full text, mbox, link).
Message #10 received at 441387@bugs.debian.org (full text, mbox, reply):
tags 441387 fixed-upstream
thanks
Hello François,
> 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).
> 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?
Cheers,
Michael
--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7
Want to help with man page maintenance? Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.
Tags added: fixed-upstream
Request was from Michael Kerrisk <mtk-manpages@gmx.net>
to control@bugs.debian.org.
(Mon, 10 Sep 2007 04:27:03 GMT) (full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#441387; Package manpages-dev.
(full text, mbox, link).
Acknowledgement sent to François Diakhate <diakhate@enseirb.fr>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>.
(full text, mbox, link).
Message #17 received at 441387@bugs.debian.org (full text, mbox, reply):
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
>
>
Bug closed, send any further explanations to François Diakhate <diakhate@enseirb.fr>
Request was from Martin Schulze <joey@infodrom.org>
to control@bugs.debian.org.
(Wed, 30 Jan 2008 17:48:07 GMT) (full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Thu, 28 Feb 2008 07:40:25 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Thu Mar 9 09:56:12 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.