Debian Bug report logs - #441387
Misleading mprotect manpage

version graph

Package: manpages-dev; Maintainer for manpages-dev is Martin Schulze <joey@debian.org>; Source for manpages-dev is src:manpages.

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

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#441387; Package manpages-dev. Full text and rfc822 format available.

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 and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: François Diakhate <diakhate@enseirb.fr>
To: submit@bugs.debian.org
Subject: Misleading mprotect manpage
Date: Sun, 09 Sep 2007 13:37:06 +0200
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 and rfc822 format available.

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 and rfc822 format available.

Message #10 received at 441387@bugs.debian.org (full text, mbox):

From: Michael Kerrisk <mtk-manpages@gmx.net>
To: François Diakhate <diakhate@enseirb.fr>, 441387@bugs.debian.org
Cc: debc <control@bugs.debian.org>
Subject: Re: Bug#441387: Misleading mprotect manpage
Date: Mon, 10 Sep 2007 06:10:48 +0200
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 and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#441387; Package manpages-dev. Full text and rfc822 format available.

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 and rfc822 format available.

Message #17 received at 441387@bugs.debian.org (full text, mbox):

From: François Diakhate <diakhate@enseirb.fr>
To: 441387@bugs.debian.org
Subject: Re: Bug#441387: Misleading mprotect manpage
Date: Mon, 10 Sep 2007 14:12:25 +0200
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 and rfc822 format available.

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 and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 04:36:58 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.