userfaultfd.2: Add a few details on UFFD_EVENT_FORK

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-05-01 14:14:37 +02:00
parent 265225c1e2
commit 522ab2ff6f
1 changed files with 12 additions and 4 deletions

View File

@ -107,11 +107,13 @@ In addition, if the faulting process invokes
.BR fork (2),
the userfaultfd objects associated with the parent may be duplicated
into the child process and the userfaultfd monitor will be notified
(via the
.B UFFD_EVENT_FORK
described below)
about the file descriptor associated with the userfault objects
created for the child process,
which allows userfaultfd monitor to perform user-space paging
which allows the userfaultfd monitor to perform user-space paging
for the child process.
Unlike page faults which have to be synchronous and require an
explicit or implicit wakeup,
all other events are delivered asynchronously and
@ -262,7 +264,12 @@ field.
.TP
.BR UFFD_EVENT_FORK " (since Linux 4.11)"
Generated when the faulting process invokes
.BR fork (2).
.BR fork (2)
(or
.BR clone (2)
without the
.BR CLONE_VM
flag).
The event details are available in the
.I fork
field.
@ -323,7 +330,8 @@ otherwise it is a read fault.
.TP
.I fork.ufd
The file descriptor associated with the userfault object
created for the child process
created for the child created by
.BR fork (2).
.TP
.I remap.from
The original address of the memory range that was remapped using