mirror of https://github.com/mkerrisk/man-pages
mmap.2: Further wording tweaks to the discussion of MAP_FIXED hazards
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
2256fc0887
commit
71c2db6a65
13
man2/mmap.2
13
man2/mmap.2
|
@ -256,11 +256,16 @@ keeping in mind that the exact layout of a process's memory mappings
|
|||
is allowed to change significantly between kernel versions,
|
||||
C library versions, and operating system releases.
|
||||
.IP
|
||||
The
|
||||
The only safe use for
|
||||
.BR MAP_FIXED
|
||||
flag should be used only when the specified memory region has
|
||||
already been reserved using another mapping; otherwise, its use is
|
||||
hazardous because it forcibly removes preexisting mappings,
|
||||
is where the address range specified by
|
||||
.IR addr
|
||||
and
|
||||
.I length
|
||||
was previously reserved using another mapping;
|
||||
otherwise, the use of
|
||||
.BR MAP_FIXED
|
||||
is hazardous because it forcibly removes preexisting mappings,
|
||||
making it easy for a multithreaded process to corrupt its own address space.
|
||||
.IP
|
||||
For example, suppose that thread A looks through
|
||||
|
|
Loading…
Reference in New Issue