Re: [PATCH v4 08/14] userfaultfd: add UFFDIO_REGISTER_MODE_RWP and UFFDIO_RWPROTECT plumbing

From: Kiryl Shutsemau

Date: Mon May 25 2026 - 11:21:57 EST


On Mon, May 25, 2026 at 12:11:11PM +0000, sashiko-bot@xxxxxxxxxx wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>
> Pre-existing issues:
> - [High] Page tables are accessed and modified under mmap_write_lock
> without first draining per-VMA lock holders via vma_start_write(),
> risking races with concurrent per-VMA readers.

Confirmed and pre-existing -- the pre-patch path called uffd_wp_range()
which has the same gap (no vma_start_write() before change_protection()
either). Will address in a follow-up that audits the userfaultfd
register/unregister paths together.

> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260525113737.1942478-1-kas@xxxxxxxxxx?part=8

--
Kiryl Shutsemau / Kirill A. Shutemov