Re: [PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-09-04 Thread Souptick Joarder
On Fri, Sep 4, 2020 at 12:09 AM Matthew Wilcox wrote: > > On Thu, Sep 03, 2020 at 12:42:44PM +0530, Souptick Joarder wrote: > > We can use is_valid_gup_flags() inside -> > > get_user_pages_locked(), > > get_user_pages_unlocked(), > > pin_user_pages_locked() as well. > > > > Are you planning to

Re: [PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-09-03 Thread Matthew Wilcox
On Thu, Sep 03, 2020 at 12:42:44PM +0530, Souptick Joarder wrote: > We can use is_valid_gup_flags() inside -> > get_user_pages_locked(), > get_user_pages_unlocked(), > pin_user_pages_locked() as well. > > Are you planning to add it in future patches ? If you're looking for a new project, adding

Re: [PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-09-03 Thread John Hubbard
On 9/3/20 12:12 AM, Souptick Joarder wrote: On Wed, Aug 19, 2020 at 11:45 PM John Hubbard wrote: On 8/19/20 4:01 AM, Barry Song wrote: gug prohibits users from calling get_user_pages() with FOLL_PIN. But it Maybe Andrew can fix the typo above: gug --> gup. allows users to call

Re: [PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-09-03 Thread Souptick Joarder
On Wed, Aug 19, 2020 at 11:45 PM John Hubbard wrote: > > On 8/19/20 4:01 AM, Barry Song wrote: > > gug prohibits users from calling get_user_pages() with FOLL_PIN. But it > > Maybe Andrew can fix the typo above: gug --> gup. > > > > allows users to call get_user_pages() with FOLL_LONGTERM only.

Re: [PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-08-19 Thread John Hubbard
On 8/19/20 4:01 AM, Barry Song wrote: gug prohibits users from calling get_user_pages() with FOLL_PIN. But it Maybe Andrew can fix the typo above: gug --> gup. allows users to call get_user_pages() with FOLL_LONGTERM only. It seems insensible. since FOLL_LONGTERM is a stricter case of

Re: [PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-08-19 Thread Ira Weiny
On Wed, Aug 19, 2020 at 11:01:00PM +1200, Barry Song wrote: > gug prohibits users from calling get_user_pages() with FOLL_PIN. But it > allows users to call get_user_pages() with FOLL_LONGTERM only. It seems > insensible. > > since FOLL_LONGTERM is a stricter case of FOLL_PIN, we should prohibit

[PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-08-19 Thread Barry Song
gug prohibits users from calling get_user_pages() with FOLL_PIN. But it allows users to call get_user_pages() with FOLL_LONGTERM only. It seems insensible. since FOLL_LONGTERM is a stricter case of FOLL_PIN, we should prohibit users from calling get_user_pages() with FOLL_LONGTERM while not with