lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 29 Aug 2020 14:57:24 -0700
From:   John Hubbard <>
To:     Christoph Hellwig <>
CC:     Andrew Morton <>,
        Alexander Viro <>,
        Ilya Dryomov <>,
        Jens Axboe <>, <>,
        <>, <>,
        <>, LKML <>
Subject: Re: [PATCH v2 1/3] mm/gup: introduce pin_user_page()

On 8/29/20 7:54 AM, Christoph Hellwig wrote:
> On Sat, Aug 29, 2020 at 01:08:51AM -0700, John Hubbard wrote:
>> pin_user_page() is the FOLL_PIN equivalent of get_page().
>> This was always a missing piece of the pin/unpin API calls (early
>> reviewers of pin_user_pages() asked about it, in fact), but until now,
>> it just wasn't needed. Finally though, now that the Direct IO pieces in
>> block/bio are about to be converted to use FOLL_PIN, it turns out that
>> there are some cases in which get_page() and get_user_pages_fast() were
>> both used. Converting those sites requires a drop-in replacement for
>> get_page(), which this patch supplies.
> I find the name really confusing vs pin_user_pages*, as it suggests as
> single version of the same.  It also seems partially wrong, at least
> in the direct I/O case as the only thing pinned here is the zero page.
> So maybe pin_kernel_page is a better name together with an explanation?
> Or just pin_page?

Yes. Both its behavior and use are closer to get_page() than it is to
get_user_pages(). So pin_page() is just right.

John Hubbard

Powered by blists - more mailing lists