Skip to contentSkip to conversation

mm/uffd: Hide PTE_MARKER option

PATCH In review Peter Xu 2 participants 2 messages Apr 19, 2022 – Apr 20, 2022

Subsystems (2)
lore
Share & tools
lore

Peter Xu

author
#0 lore raw

PATCH 1/1 mm/uffd: Hide PTE_MARKER option

The PTE_MARKER option should not need to be exposed to the kernel builder, keep it internal and remove the prompt so it won't be seen.

Instead, make the PTE_MARKER_UFFD_WP option to explicitly choose PTE_MARKER when necessary.

While PTE_MARKER_UFFD_WP will still prompt to user, change the wording so that it'll not mention PTE_MARKER at all but renaming it to "Userfaultfd write protection support for shmem/hugetlbfs".

---

NOTE: IMHO this patch can either be standalone if easier, or be squashed into patch "mm: Enable PTE markers by default" in -mm.

Please review, thanks.

---
 mm/Kconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
mm/Kconfig +4 -4
index 3eca34c864c5..d740e1ff3b2f 100644
@@ -910,16 +910,16 @@ config ANON_VMA_NAME
 	  difference in their name.
 
 config PTE_MARKER
-	bool "Marker PTEs support"
-	default y
+	bool
 
 	help
 	  Allows to create marker PTEs for file-backed memory.
 
 config PTE_MARKER_UFFD_WP
-	bool "Marker PTEs support for userfaultfd write protection"
+	bool "Userfaultfd write protection support for shmem/hugetlbfs"
 	default y
-	depends on PTE_MARKER && HAVE_ARCH_USERFAULTFD_WP
+	depends on HAVE_ARCH_USERFAULTFD_WP
+	select PTE_MARKER
 
 	help
 	  Allows to create marker PTEs for userfaultfd write protection
Signature · 1 line
2.32.0
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Peter Xu

The PTE_MARKER option should not need to be exposed to the kernel builder, keep it internal and remove the prompt so it won't be seen.

Instead, make the PTE_MARKER_UFFD_WP option to explicitly choose PTE_MARKER when necessary.

Quoted 6 lines

While PTE_MARKER_UFFD_WP will still prompt to user, change the wording so that it'll not mention PTE_MARKER at all but renaming it to "Userfaultfd write protection support for shmem/hugetlbfs".

Thank you Peter