| UFFDIO_REGISTER(2const) | UFFDIO_REGISTER(2const) |
UFFDIO_REGISTER - register a memory address range with the userfaultfd object
Standard C library (libc, -lc)
#include <linux/userfaultfd.h> /* Definition of UFFD* constants */ #include <sys/ioctl.h>
int ioctl(int fd, UFFDIO_REGISTER, struct uffdio_register *argp);
#include <linux/userfaultfd.h>
struct uffdio_range {
__u64 start; /* Start of range */
__u64 len; /* Length of range (bytes) */
};
struct uffdio_register {
struct uffdio_range range;
__u64 mode; /* Desired mode of operation (input) */
__u64 ioctls; /* Available ioctl()s (output) */
};
Register a memory address range with the userfaultfd object. The pages in the range must be “compatible”. Please refer to the list of register modes below for the compatible memory backends for each mode.
The argp->range field defines a memory range starting at argp->range.start and continuing for argp->range.len bytes that should be handled by the userfaultfd.
The argp->mode field defines the mode of operation desired for this memory region. The following values may be bitwise ORed to set the userfaultfd mode for the specified range:
If the operation is successful, the kernel modifies the argp->ioctls bit-mask field to indicate which ioctl(2) operations are available for the specified range. This returned bit mask can contain the following bits:
On success, 0 is returned. On error, -1 is returned and errno is set to indicate the error.
Linux.
Linux 4.3.
See userfaultfd(2).
ioctl(2), ioctl_userfaultfd(2), UFFDIO_UNREGISTER(2const), userfaultfd(2)
linux.git/Documentation/admin-guide/mm/userfaultfd.rst
| 2024-06-17 | Linux man-pages 6.9.1 |