mirror of https://github.com/mkerrisk/man-pages
mprotect.2: Various fixes to Eugene Syromyatnikov's text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
be232513a2
commit
d88d01c6b8
|
@ -72,19 +72,20 @@ The memory can be executed.
|
||||||
.TP
|
.TP
|
||||||
.BR PROT_SEM " (since Linux 2.5.7)"
|
.BR PROT_SEM " (since Linux 2.5.7)"
|
||||||
The memory can be used for atomic operations.
|
The memory can be used for atomic operations.
|
||||||
It was introduced as part of
|
This flag was introduced as part of the
|
||||||
.BR futex (2)
|
.BR futex (2)
|
||||||
implementation (in order to guarantee ability to perform atomic
|
implementation (in order to guarantee the ability to perform atomic
|
||||||
operations required by its commands such as
|
operations required by commands such as
|
||||||
.BR FUTEX_WAIT ),
|
.BR FUTEX_WAIT ),
|
||||||
but not actually used in any currently supported architecture so far.
|
but is not currently used in on any architecture.
|
||||||
.\" aba46c5027cb59d98052231b36efcbbde9c77a1d ef3d3246a0d06be622867d21af25f997aeeb105f
|
|
||||||
.TP
|
.TP
|
||||||
.BR PROT_SAO " (since Linux 2.6.26)"
|
.BR PROT_SAO " (since Linux 2.6.26)"
|
||||||
|
.\" commit aba46c5027cb59d98052231b36efcbbde9c77a1d
|
||||||
|
.\" commit ef3d3246a0d06be622867d21af25f997aeeb105f
|
||||||
The memory should have strong access ordering.
|
The memory should have strong access ordering.
|
||||||
This feature is specific to
|
This feature is specific to
|
||||||
PowerPC architecture
|
the PowerPC architecture
|
||||||
(version 2.06 of architecture specification adds SAO CPU feature,
|
(version 2.06 of the architecture specification adds the SAO CPU feature,
|
||||||
and it is available on POWER 7 or PowerPC A2, for example).
|
and it is available on POWER 7 or PowerPC A2, for example).
|
||||||
.PP
|
.PP
|
||||||
Additionally (since Linux 2.6.0),
|
Additionally (since Linux 2.6.0),
|
||||||
|
@ -96,17 +97,22 @@ can have one of the following flags set:
|
||||||
.\" mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
|
.\" mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
|
||||||
.\" And calc_vm_flag_bits converts only GROWSDOWN/DENYWRITE/LOCKED.
|
.\" And calc_vm_flag_bits converts only GROWSDOWN/DENYWRITE/LOCKED.
|
||||||
.B PROT_GROWSUP
|
.B PROT_GROWSUP
|
||||||
Apply protection mode up to the end of the mapping which grows up
|
Apply the protection mode up to the end of a mapping
|
||||||
(it should be a stack segment on HP PA-RISC,
|
that grows upwards.
|
||||||
since there are no other ways to map a segment with
|
(Such mappings are created for the stack area on
|
||||||
.B VM_GROWSUP
|
architectures\(emfor example, HP-PARISC\(emthat
|
||||||
even if architecture has support for it.)
|
have an upwardly growing stack.)
|
||||||
|
.\" The VMA is one that was marked with VM_GROWSUP by the kernel
|
||||||
|
.\" when the stack was created. Note that (unlike VM_GROWSDOWN),
|
||||||
|
.\" there is no mmap() flag (analogous to MAP_GROWSDOWN) for
|
||||||
|
.\" creating a VMA that is marked VM_GROWSUP.
|
||||||
.TP
|
.TP
|
||||||
.B PROT_GROWSDOWN
|
.B PROT_GROWSDOWN
|
||||||
Apply protection mode down to the beginning of the mapping which grows down
|
Apply the protection mode down to the beginning of a mapping
|
||||||
(it should be stack segment or mapped with
|
that grows downward
|
||||||
|
(which should be a stack segment or a segment mapped with the
|
||||||
.B MAP_GROWSDOWN
|
.B MAP_GROWSDOWN
|
||||||
flag set.)
|
flag set).
|
||||||
.PP
|
.PP
|
||||||
Like
|
Like
|
||||||
.BR mprotect (),
|
.BR mprotect (),
|
||||||
|
@ -164,22 +170,13 @@ were specified in
|
||||||
.IR prot .
|
.IR prot .
|
||||||
.TP
|
.TP
|
||||||
.BR EINVAL
|
.BR EINVAL
|
||||||
Invalid (other than
|
Invalid flags specified in
|
||||||
.BR PROT_READ ,
|
|
||||||
.BR PROT_WRITE ,
|
|
||||||
.BR PROT_EXEC ,
|
|
||||||
.BR PROT_SEM ,
|
|
||||||
.BR PROT_SAO
|
|
||||||
(on PowerPC only),
|
|
||||||
.BR PROT_GROWSUP ,
|
|
||||||
.BR PROT_GROWSDOWN )
|
|
||||||
flags specified in
|
|
||||||
.IR prot .
|
.IR prot .
|
||||||
.TP
|
.TP
|
||||||
.BR EINVAL
|
.BR EINVAL
|
||||||
(PowerPC architecture)
|
(PowerPC architecture)
|
||||||
.B PROT_SAO
|
.B PROT_SAO
|
||||||
specified in
|
was specified in
|
||||||
.IR prot ,
|
.IR prot ,
|
||||||
but SAO hardware feature is not available.
|
but SAO hardware feature is not available.
|
||||||
.TP
|
.TP
|
||||||
|
|
Loading…
Reference in New Issue