Re: [PATCH RFC 0/5] mm: GUP dirty + ->release_folio() fixes

From: Pedro Falcato

Date: Wed Nov 25 2026 - 06:21:42 EST


On Wed, Nov 25, 2026 at 11:19:18AM +0100, David Hildenbrand (Arm) wrote:
> On 11/25/26 11:05, Christoph Hellwig wrote:
> > On Wed, Nov 25, 2026 at 10:50:42AM +0100, David Hildenbrand (Arm) wrote:
> >> When I looked into this issue, there were some problematic things.
> >>
> >> We have some odd drivers that use FOLL_GET|FOLL_WRITE, but I am not too
> >> concerned about them.
> >>
> >> But are ways where unprivileged users can mess with FOLL_GET|FOLL_WRITE
> >> references to trigger this.
> >>
> >> I think the two that stand out are:
> >>
> >> 1) /proc/self/mem access using mem_rw() -> access_remote_vm()
> >>
> >> User can write to a writable-mapped page-cache PTE. Then we can race with
> >> removal of folio metadta, to then set the folio dirty afterwards.
> >>
> >> I remember a good reason to not convert these paths in the past (we are not
> >> performing DMA).
> >
> > I don't think that is a good reason. For file system backed VMAs we
> > really need the pin to be able to do someting sane, DMA or not.
> >
> >> 1) We fix all such cases now where unprivileged users can trigger this,
> >> converting to FOLL_PIN.
> >
> > We need to, if not for this series then for all the other outstanding
> > issues with GUP writes.
>
> Cool, and I agree (that's why I placed it at 1).
>
> But who is "we"? Because I recall that "we" wanted to do that a while ago.
>
> (I won't be "we" ;) Pedro, can you take a look? I'm afraid the fuse thing might
> be the harder nut to crack)

"we"[1] will take a look.

--
Pedro

[1] https://en.wikipedia.org/wiki/Royal_we