Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Dec 2002 11:29:43 +0100 (CET)
From:      Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/46252: [Patch] mprotect.2 update and clarification
Message-ID:  <20021214102943.5016D19D@213-84-207-11.adsl.xs4all.nl>

next in thread | raw e-mail | index | archive | help

>Number:         46252
>Category:       docs
>Synopsis:       [Patch] mprotect.2 update and clarification
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 14 02:30:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jeroen Ruigrok van der Werven
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Ninth Circle Enterprises
>Environment:
System: FreeBSD nexus.chronias.ninth-circle.org 4.7-STABLE FreeBSD 4.7-STABLE #5: Sat Oct 19 12:35:12 CEST 2002 asmodai@nexus.chronias.ninth-circle.org:/usr/src/sys/compile/NEXUS i386

>Description:

The mprotect(2) manual page is too short to be of much value for most
programmers needing its information.  They need to look through sources
and header files, which isn't what you want experienced programmers doing
commercial porting work to do.  (Time is money!)

>How-To-Repeat:

Read the manual page and wonder:

What's a region?
What are the protection bits then?

>Fix:

Apply attached diff.

Index: src/lib/libc/sys/mprotect.2
===================================================================
RCS file: /home/ncvs/FreeBSD/src/lib/libc/sys/mprotect.2,v
retrieving revision 1.14
diff -u -r1.14 mprotect.2
--- src/lib/libc/sys/mprotect.2	24 Aug 2002 00:39:43 -0000	1.14
+++ src/lib/libc/sys/mprotect.2	14 Dec 2002 10:20:19 -0000
@@ -52,6 +52,22 @@
 .Fa prot .
 Not all implementations will guarantee protection on a page basis;
 the granularity of protection changes may be as large as an entire region.
+A region is the virtual address space defined by the start
+and end addresses of a
+.Vt "struct vm_map_entry" .
+.Pp
+Currently these protection bits are known,
+which can be combined, OR'd together:
+.Bl -tag width "PROT_WRITE"
+.It PROT_NONE
+No permissions at all.
+.It PROT_READ
+The pages can be read.
+.It PROT_WRITE
+The pages can be written.
+.It PROT_EXEC
+The pages can be executed.
+.El
 .Sh RETURN VALUES
 .Rv -std mprotect
 .Sh ERRORS
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021214102943.5016D19D>