Skip to content

Commit 97219cc

Browse files
xzpeterakpm00
authored andcommitted
mm/Kconfig: make userfaultfd a menuconfig
PTE_MARKER_UFFD_WP is a subconfig for userfaultfd. To make it clear, switch to use menuconfig for userfaultfd. Link: https://lkml.kernel.org/r/20231123224204.1060152-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Axel Rasmussen <axelrasmussen@google.com> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Cc: Peter Xu <peterx@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent f39fb63 commit 97219cc

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

mm/Kconfig

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,13 +1201,6 @@ config ANON_VMA_NAME
12011201
area from being merged with adjacent virtual memory areas due to the
12021202
difference in their name.
12031203

1204-
config USERFAULTFD
1205-
bool "Enable userfaultfd() system call"
1206-
depends on MMU
1207-
help
1208-
Enable the userfaultfd() system call that allows to intercept and
1209-
handle page faults in userland.
1210-
12111204
config HAVE_ARCH_USERFAULTFD_WP
12121205
bool
12131206
help
@@ -1218,6 +1211,14 @@ config HAVE_ARCH_USERFAULTFD_MINOR
12181211
help
12191212
Arch has userfaultfd minor fault support
12201213

1214+
menuconfig USERFAULTFD
1215+
bool "Enable userfaultfd() system call"
1216+
depends on MMU
1217+
help
1218+
Enable the userfaultfd() system call that allows to intercept and
1219+
handle page faults in userland.
1220+
1221+
if USERFAULTFD
12211222
config PTE_MARKER_UFFD_WP
12221223
bool "Userfaultfd write protection support for shmem/hugetlbfs"
12231224
default y
@@ -1227,6 +1228,7 @@ config PTE_MARKER_UFFD_WP
12271228
Allows to create marker PTEs for userfaultfd write protection
12281229
purposes. It is required to enable userfaultfd write protection on
12291230
file-backed memory types like shmem and hugetlbfs.
1231+
endif # USERFAULTFD
12301232

12311233
# multi-gen LRU {
12321234
config LRU_GEN

0 commit comments

Comments
 (0)