Re: [PATCH v1] mm/gup: disallow FOLL_FORCE|FOLL_WRITE on hugetlb mappings

From: Jason Gunthorpe
Date: Wed Nov 02 2022 - 07:38:12 EST


On Wed, Nov 02, 2022 at 10:14:34AM +0100, David Hildenbrand wrote:

> RDMA (due to FOLL_FORCE) would now fail (instead of doing something wrong)
> on MAP_PRIVATE hugetlb mappings that are R/O. Do we have any actual examples
> of such RDMA usage? I was able to understand why this case (MAP_PRIVATE,
> PROT_READ) is important for !hugetlb, but I don't immediately see under
> which situations this would apply to hugetlb.

It may be that every one is already using MAP_SHARED for hugetlb,
which would make it fine..

Jason