NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/52519: mprotect(2) man page ERRORS section is pathetic
>Number: 52519
>Category: lib
>Synopsis: mprotect(2) man page ERRORS section is pathetic
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 01 16:30:00 +0000 2017
>Originator: Robert Elz
>Release: NetBSD 8.99.2 (probably all since the man page was created)
>Organization:
>Environment:
System: NetBSD andromeda.noi.kre.to 8.99.1 NetBSD 8.99.1 (VBOX64-1.3-20170812) #39: Sat Aug 12 15:25:04 ICT 2017 kre%magnolia.noi.kre.to@localhost:/usr/obj/current/kernels/amd64/VBOX64 amd64
Architecture: x86_64
Machine: amd64
>Description:
The error descriptions for mprotect(2) leave a lot to be desired.
For EACCCES no mention should inlude (explicitly):
If PAX is emabled and an attempt is made to set write & exec
not just "PAX mprotect restrictions prohibit..."
It should also give more info on what
"A memory protection violation occurred"
means.
For EINVAL (aka: "Invalid argument") the current wording is...
"An invalid memory range, or invalid parameters were provided."
ie: 'an invalid argument gives an invalid argument error'.
Huh? Some indication what args are invalid, or what is
required for the args to be valid, is needed.
For ENOMEM there's no indication what kind of resource shortage
causes this error, is it something related to the
program itself (too many executable pages?) or RLIMIT
related isste, or the system overall (will waiting a bit
and trying again ever work?)
>How-To-Repeat:
RTFM
>Fix:
Rewrite the ERRORS section entirely, and provide information that
is actually useful to someone attempting to use mprotect(2).
Home |
Main Index |
Thread Index |
Old Index