Skip to contentSkip to conversation

proc: fix documentation and description of mmap

PATCH Superseded Yun Zhou 2 participants 3 messages Mar 1, 2022

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yun Zhou

author
#0 lore raw

PATCH 1/1 proc: fix documentation and description of mmap

Since bit 57 was exported for uffd-wp write-protected(commit fb8e37f35a2f), fixing it can reduce some unnecessary confusion.

---
 Documentation/admin-guide/mm/pagemap.rst | 2 +-
 fs/proc/task_mmu.c                       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Documentation/admin-guide/mm/pagemap.rst +1 -1
index bfc28704856c..6e2e416af783 100644
@@ -23,7 +23,7 @@ There are four components to pagemap:
     * Bit  56    page exclusively mapped (since 4.2)
     * Bit  57    pte is uffd-wp write-protected (since 5.13) (see
       :ref:`Documentation/admin-guide/mm/userfaultfd.rst <userfaultfd>`)
-    * Bits 57-60 zero
+    * Bits 58-60 zero
     * Bit  61    page is file-page or shared-anon (since 3.5)
     * Bit  62    page swapped
     * Bit  63    page present
fs/proc/task_mmu.c +2 -1
index 78125ef20255..75511f78075f 100644
@@ -1596,7 +1596,8 @@ static const struct mm_walk_ops pagemap_ops = {
  * Bits 5-54  swap offset if swapped
  * Bit  55    pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst)
  * Bit  56    page exclusively mapped
- * Bits 57-60 zero
+ * Bit  57    pte is uffd-wp write-protected (since 5.13) (see
+ * Bits 58-60 zero
  * Bit  61    page is file-page or shared-anon
  * Bit  62    page swapped
  * Bit  63    page present
Signature · 1 line
2.27.0
#1 lore raw

fs/proc/task_mmu.c static const struct mm_walk_ops pagemap_ops = { · line 1599

Quoted 10 lines · Yun Zhou
fs/proc/task_mmu.c +1 -1
index 78125ef20255..75511f78075f 100644
@@ -1596,7 +1596,8 @@ static const struct mm_walk_ops pagemap_ops = {
  * Bits 5-54  swap offset if swapped
  * Bit  55    pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst)
  * Bit  56    page exclusively mapped
- * Bits 57-60 zero
+ * Bit  57    pte is uffd-wp write-protected (since 5.13) (see
                                                ^^^^^^^^^^^^^^^^^ remove these?

Thanks,

Signature · 1 line
Peter Xu
author
#2 lore raw
Quoted 14 lines · Peter Xu

[Please note: This e-mail is from an EXTERNAL e-mail address]

fs/proc/task_mmu.c static const struct mm_walk_ops pagemap_ops = { · line 1599

Quoted 10 lines · Yun Zhou
fs/proc/task_mmu.c +1 -1
index 78125ef20255..75511f78075f 100644
@@ -1596,7 +1596,8 @@ static const struct mm_walk_ops pagemap_ops = {
   * Bits 5-54  swap offset if swapped
   * Bit  55    pte is soft-dirty (see Documentation/admin-guide/mm/soft-dirty.rst)
   * Bit  56    page exclusively mapped
- * Bits 57-60 zero
+ * Bit  57    pte is uffd-wp write-protected (since 5.13) (see
                                                 ^^^^^^^^^^^^^^^^^ remove these?

Sorry for my mistake, I will follow your suggestion and send patch v2.

Thanks,
Yun