Re: [PATCH v4 08/23] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-14 Thread Jason Gunthorpe
On Tue, Nov 12, 2019 at 08:26:55PM -0800, John Hubbard wrote: > As it says in the updated comment in gup.c: current FOLL_LONGTERM > behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the > FS DAX check requirement on vmas. > > However, the corresponding restriction in

Re: [PATCH v4 08/23] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-13 Thread John Hubbard
On 11/13/19 11:17 AM, Ira Weiny wrote: ... @@ -348,33 +347,13 @@ static int vaddr_get_pfn(struct mm_struct *mm, unsigned long vaddr, flags |= FOLL_WRITE; down_read(>mmap_sem); - if (mm == current->mm) { - ret = get_user_pages(vaddr, 1, flags |

Re: [PATCH v4 08/23] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-13 Thread Ira Weiny
On Wed, Nov 13, 2019 at 09:02:02AM -0400, Jason Gunthorpe wrote: > On Tue, Nov 12, 2019 at 08:26:55PM -0800, John Hubbard wrote: > > As it says in the updated comment in gup.c: current FOLL_LONGTERM > > behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the > > FS DAX check

Re: [PATCH v4 08/23] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-13 Thread Ira Weiny
On Tue, Nov 12, 2019 at 08:26:55PM -0800, John Hubbard wrote: > As it says in the updated comment in gup.c: current FOLL_LONGTERM > behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the > FS DAX check requirement on vmas. > > However, the corresponding restriction in

[PATCH v4 08/23] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-12 Thread John Hubbard
As it says in the updated comment in gup.c: current FOLL_LONGTERM behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the FS DAX check requirement on vmas. However, the corresponding restriction in get_user_pages_remote() was slightly stricter than is actually required: it forbade all