From e1960e7e7e1de5e653c4646942a1a0acbeef5389 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 12 Jun 2021 10:31:40 +0200 Subject: [PATCH] userfaultfd.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- man2/userfaultfd.2 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index e1a18a9d9..cee7c01d2 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -29,12 +29,18 @@ userfaultfd \- create a file descriptor for handling page faults in user space .SH SYNOPSIS .nf +.BR "#include " " /* Definition of " O_* " constants */" +.BR "#include " " /* Definition of " SYS_* " constants */" +.B #include .PP -.BI "int userfaultfd(int " flags ); +.BI "int syscall(SYS_userfaultfd, int " flags ); .fi .PP .IR Note : -There is no glibc wrapper for this system call; see NOTES. +glibc provides no wrapper for +.BR userfaultfd (), +necessitating the use of +.BR syscall (2). .SH DESCRIPTION .BR userfaultfd () creates a new userfaultfd object that can be used for delegation of page-fault @@ -573,9 +579,6 @@ non-page-fault events was added in Linux 4.11 is Linux-specific and should not be used in programs intended to be portable. .SH NOTES -Glibc does not provide a wrapper for this system call; call it using -.BR syscall (2). -.PP The userfaultfd mechanism can be used as an alternative to traditional user-space paging techniques based on the use of the .BR SIGSEGV