Re: [PATCH v2] mm/gup: disallow GUP writing to file-backed mappings by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 24, 2023 at 08:18:33PM +0100, Lorenzo Stoakes wrote:

> I think this patch suggestion has scope crept from 'incremental
> improvement' to 'major rework of GUP' at this point. 

I don't really expect to you clean up all the callers - but we are
trying to understand what is actually wrong here to come up with the
right FOLL_ names and overall strategy. Leave behind a comment, for
instance.

I don't think anyone has really thought about the ptrace users too
much till now, we were all thinking about DMA use cases, it shows we
still have some areas that need attention.

> Also surely you'd want to obtain the PTL of all mappings to a file?

No, just one is fine. If you do the memcpy under a single PTL that
points at a writable copy of the page then everything is trivially
fine because it is very similar to what the CPU itself would do, which
is fine by definition..

Jason



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux