Re: [PATCH mm-unstable v1 09/20] mm/gup: reliable R/O long-term pinning in COW mappings

2022-11-23 Thread John Hubbard
On 11/16/22 02:26, David Hildenbrand wrote: ... With this change, the new R/O long-term pinning tests for non-anonymous memory succeed: # [RUN] R/O longterm GUP pin ... with shared zeropage ok 151 Longterm R/O pin is reliable # [RUN] R/O longterm GUP pin ... with memfd ok 152 Longterm

Re: [PATCH mm-unstable v1 16/20] mm/frame-vector: remove FOLL_FORCE usage

2022-11-23 Thread Hans Verkuil
On 23/11/2022 14:26, Hans Verkuil wrote: > Hi David, Tomasz, > > On 16/11/2022 11:26, David Hildenbrand wrote: >> FOLL_FORCE is really only for ptrace access. According to commit >> 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are always >> writable"), get_vaddr_frames() currently

Re: [PATCH mm-unstable v1 13/20] media: videobuf-dma-sg: remove FOLL_FORCE usage

2022-11-23 Thread Hans Verkuil
On 16/11/2022 11:26, David Hildenbrand wrote: > GUP now supports reliable R/O long-term pinning in COW mappings, such > that we break COW early. MAP_SHARED VMAs only use the shared zeropage so > far in one corner case (DAXFS file with holes), which can be ignored > because GUP does not support long

Re: [PATCH mm-unstable v1 15/20] media: pci/ivtv: remove FOLL_FORCE usage

2022-11-23 Thread Hans Verkuil
On 16/11/2022 11:26, David Hildenbrand wrote: > FOLL_FORCE is really only for ptrace access. R/O pinning a page is > supposed to fail if the VMA misses proper access permissions (no VM_READ). > > Let's just remove FOLL_FORCE usage here; there would have to be a pretty > good reason to allow arbitr

Re: [PATCH mm-unstable v1 16/20] mm/frame-vector: remove FOLL_FORCE usage

2022-11-23 Thread Hans Verkuil
Hi David, Tomasz, On 16/11/2022 11:26, David Hildenbrand wrote: > FOLL_FORCE is really only for ptrace access. According to commit > 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are always > writable"), get_vaddr_frames() currently pins all pages writable as a > workaround for iss