On Wed, Feb 11, 2026 at 02:35:23PM -0500, Peter Xu wrote: > On Sun, Feb 08, 2026 at 12:13:45PM +0200, Mike Rapoport wrote: > > > > > > I understand you wanted to also make anon to be a driver, so this line > > > won't apply to anon. However IMHO anon is special enough so we can still > > > make this in the generic path. > > > > Well, the idea is to drop all vma_is*() in can_userfault(). And maybe > > eventually in entire mm/userfaultfd.c > > > > If all page cache filesystems need this, something like this should work, > > right? > > > > if (!uffd_supports_wp_marker() && (vma->vm_flags & VM_SHARED) && > > (vm_flags & VM_UFFD_WP)) > > return false; > > Sorry for a late response. > > IMHO using vma_is_anonymous() for one more time should be better than > leaking pte marker whole concept to modules. So the driver should only > report if the driver supports UFFD_WP in general. It shouldn't care about > anything the core mm would already do otherwise, including this one on > "whether system config / arch has globally enabled pte markers" and the > relation between that config and the WP feature impl details.
I agree. Will move the check for the markers back into userfaultfd.c > Thanks, > > -- > Peter Xu > -- Sincerely yours, Mike.

