Re: [PATCH 02/14] mm: rename uffd-wp PTE bit macros to uffd

Mike Rapoport
2026-05-04T07:52:06Z

On Mon, Apr 27, 2026 at 12:45:50PM +0100, Kiryl Shutsemau (Meta) wrote:
> The uffd-wp PTE bit is about to gain a second consumer: userfaultfd
> RWP will use the same bit to mark access-tracking PTEs, distinct
> from mprotect(PROT_NONE) or NUMA-hinting PTEs. WP vs RWP semantics
> come from the VMA flag; the bit is just "uffd has claimed this
> entry." Drop the "_wp" suffix from the arch-private bit macros so
> they reflect that.
>
> x86: _PAGE_BIT_UFFD_WP -> _PAGE_BIT_UFFD
> _PAGE_UFFD_WP -> _PAGE_UFFD
> _PAGE_SWP_UFFD_WP -> _PAGE_SWP_UFFD
> arm64: PTE_UFFD_WP -> PTE_UFFD
> PTE_SWP_UFFD_WP -> PTE_SWP_UFFD
> riscv: _PAGE_UFFD_WP -> _PAGE_UFFD
> _PAGE_SWP_UFFD_WP -> _PAGE_SWP_UFFD
>
> Pure mechanical rename — no behavior change.
>
> Signed-off-by: Kiryl Shutsemau <kas@kernel.org>
> Assisted-by: Claude:claude-opus-4-6

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
> arch/arm64/include/asm/pgtable-prot.h | 8 ++++----
> arch/arm64/include/asm/pgtable.h | 12 ++++++------
> arch/riscv/include/asm/pgtable-bits.h | 12 ++++++------
> arch/riscv/include/asm/pgtable.h | 14 +++++++-------
> arch/x86/include/asm/pgtable.h | 24 ++++++++++++------------
> arch/x86/include/asm/pgtable_types.h | 16 ++++++++--------
> 6 files changed, 43 insertions(+), 43 deletions(-)

--
Sincerely yours,
Mike.