diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 60fd29b77..32f0744d1 100644 --- a/man2/ioctl_userfaultfd.2 +++ b/man2/ioctl_userfaultfd.2 @@ -196,6 +196,15 @@ with the flag set, .BR memfd_create (2), and so on. +.TP +.B UFFD_FEATURE_SIGBUS +Since Linux 4.14, If this feature bit is set, no page-fault events +.B (UFFD_EVENT_PAGEFAULT) +will be delivered, instead a +.B SIGBUS +signal will be sent to the faulting process. Applications using this +feature will not require the use of a userfaultfd monitor for processing +memory accesses to the regions registered with userfaultfd. .IP The returned .I ioctls diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index 1741ee3ad..3c5b9c0ab 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -171,6 +171,29 @@ or .B UFFDIO_ZERO .BR ioctl (2) operations to resolve the page fault. +.PP +Starting from Linux 4.14, if application sets +.B UFFD_FEATURE_SIGBUS +feature bit using +.B UFFDIO_API +.BR ioctl (2), +no page fault notification will be forwarded to +the user-space, instead a +.B SIGBUS +signal is delivered to the faulting process. With this feature, +userfaultfd can be used for robustness purpose to simply catch +any access to areas within the registered address range that do not +have pages allocated, without having to listen to userfaultfd events. +No userfaultfd monitor will be required for dealing with such memory +accesses. For example, this feature can be useful for applications that +want to prevent the kernel from automatically allocating pages and filling +holes in sparse files when the hole is accessed thru mapped address. +.PP +The +.B UFFD_FEATURE_SIGBUS +feature is implicitly inherited through fork() if used in combination with +.BR UFFD_FEATURE_FORK . + .PP Details of the various .BR ioctl (2)