From 629a4efeff6faff966ecf7a90f42d483036745cd Mon Sep 17 00:00:00 2001 From: Axel Rasmussen Date: Fri, 19 Aug 2022 13:52:00 -0700 Subject: [PATCH] userfaultfd-update-documentation-to-describe-dev-userfaultfd-v7 improve wording in two spots in the documentation, per Mike Link: https://lkml.kernel.org/r/20220819205201.658693-5-axelrasmussen@google.com Acked-by: Peter Xu Signed-off-by: Axel Rasmussen Reviewed-by: Shuah Khan Cc: Al Viro Cc: Dave Hansen Cc: Dmitry V. Levin Cc: Gleb Fotengauer-Malinovskiy Cc: Hugh Dickins Cc: Jan Kara Cc: Jonathan Corbet Cc: Mel Gorman Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mike Rapoport Cc: Nadav Amit Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Zhang Yi Signed-off-by: Andrew Morton --- Documentation/admin-guide/mm/userfaultfd.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/admin-guide/mm/userfaultfd.rst b/Documentation/admin-guide/mm/userfaultfd.rst index a76c9dc1865b..83f31919ebb3 100644 --- a/Documentation/admin-guide/mm/userfaultfd.rst +++ b/Documentation/admin-guide/mm/userfaultfd.rst @@ -66,14 +66,14 @@ userfaultfd(2) syscall. Access to this is controlled in several ways: only. Such a userfaultfd can be created using the userfaultfd(2) syscall with the flag UFFD_USER_MODE_ONLY. -- In order to also trap kernel page faults for the address space, then either - the process needs the CAP_SYS_PTRACE capability, or the system must have +- In order to also trap kernel page faults for the address space, either the + process needs the CAP_SYS_PTRACE capability, or the system must have vm.unprivileged_userfaultfd set to 1. By default, vm.unprivileged_userfaultfd is set to 0. -The second way, added to the kernel more recently, is by opening and issuing a -USERFAULTFD_IOC_NEW ioctl to /dev/userfaultfd. This method yields equivalent -userfaultfds to the userfaultfd(2) syscall. +The second way, added to the kernel more recently, is by opening +/dev/userfaultfd and issuing a USERFAULTFD_IOC_NEW ioctl to it. This method +yields equivalent userfaultfds to the userfaultfd(2) syscall. Unlike userfaultfd(2), access to /dev/userfaultfd is controlled via normal filesystem permissions (user/group/mode), which gives fine grained access to -- 2.50.1