ioctl_userfaultfd(2) — Linux manual page

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | STANDARDS | EXAMPLES | SEE ALSO | COLOPHON

ioctl_userfaultfd(2)       System Calls Manual      ioctl_userfaultfd(2)

NAME         top

       ioctl_userfaultfd - create a file descriptor for handling page
       faults in user space

LIBRARY         top

       Standard C library (libc, -lc)

SYNOPSIS         top

       #include <linux/userfaultfd.h>  /* Definition of UFFD* constants */
       #include <sys/ioctl.h>

       int ioctl(int fd, int op, ...);

DESCRIPTION         top

       Various ioctl(2) operations can be performed on a userfaultfd
       object (created by a call to userfaultfd(2)) using calls of the
       form:

           ioctl(fd, op, argp);

       In the above, fd is a file descriptor referring to a userfaultfd
       object, op is one of the operations listed below, and argp is a
       pointer to a data structure that is specific to op.

       The various ioctl(2) operations are described below.  The
       UFFDIO_API, UFFDIO_REGISTER, and UFFDIO_UNREGISTER operations are
       used to configure userfaultfd behavior.  These operations allow
       the caller to choose what features will be enabled and what kinds
       of events will be delivered to the application.  The remaining
       operations are range operations.  These operations enable the
       calling application to resolve page-fault events.

       UFFDIO_API(2const)
       UFFDIO_REGISTER(2const)
       UFFDIO_UNREGISTER(2const)
       UFFDIO_COPY(2const)
       UFFDIO_ZEROPAGE(2const)
       UFFDIO_WAKE(2const)
       UFFDIO_WRITEPROTECT(2const)
       UFFDIO_CONTINUE(2const)
       UFFDIO_POISON(2const)

RETURN VALUE         top

       On success, 0 is returned.  On error, -1 is returned, and errno
       is set to indicate the error.

ERRORS         top

       The following general errors can occur for all of the operations
       described above:

       EFAULT argp does not point to a valid memory address.

       EINVAL (For all operations except UFFDIO_API.)  The userfaultfd
              object has not yet been enabled (via the UFFDIO_API
              operation).

STANDARDS         top

       Linux.

EXAMPLES         top

       See userfaultfd(2).

SEE ALSO         top

       ioctl(2), mmap(2), userfaultfd(2)

       linux.git/Documentation/admin-guide/mm/userfaultfd.rst

COLOPHON         top

       This page is part of the man-pages (Linux kernel and C library
       user-space interface documentation) project.  Information about
       the project can be found at 
       ⟨https://www.kernel.org/doc/man-pages/⟩.  If you have a bug report
       for this manual page, see
       ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.
       This page was obtained from the tarball man-pages-6.9.1.tar.gz
       fetched from
       ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on
       2024-06-26.  If you discover any rendering problems in this HTML
       version of the page, or you believe there is a better or more up-
       to-date source for the page, or you have corrections or
       improvements to the information in this COLOPHON (which is not
       part of the original manual page), send a mail to
       [email protected]

Linux man-pages 6.9.1          2024-06-14           ioctl_userfaultfd(2)

Pages that refer to this page: ioctl(2)UFFDIO_API(2const)UFFDIO_CONTINUE(2const)UFFDIO_COPY(2const)UFFDIO_POISON(2const)UFFDIO_REGISTER(2const)UFFDIO_UNREGISTER(2const)UFFDIO_WAKE(2const)UFFDIO_WRITEPROTECT(2const)UFFDIO_ZEROPAGE(2const)userfaultfd(2)