NetBSD Problem Report #52519

From kre@munnari.OZ.AU  Fri Sep  1 16:27:49 2017
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D0E037A219
	for <gnats-bugs@www.NetBSD.org>; Fri,  1 Sep 2017 16:27:49 +0000 (UTC)
Message-Id: <201709011627.v81GRPcU004177@andromeda.noi.kre.to>
Date: Fri, 1 Sep 2017 23:27:25 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@www.NetBSD.org
Subject: mprotect(2) man page ERRORS section is pathetic
X-Send-Pr-Version: 3.95

>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:/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).

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.