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:   Wed, 15 Jan 2020 13:34:16 -0800
From:   John Hubbard <>
To:     Christoph Hellwig <>
CC:     Andrew Morton <>,
        Al Viro <>,
        Alex Williamson <>,
        Benjamin Herrenschmidt <>,
        Björn Töpel <>,
        Dan Williams <>,
        Daniel Vetter <>,
        Dave Chinner <>,
        David Airlie <>,
        "David S . Miller" <>,
        Ira Weiny <>, Jan Kara <>,
        Jason Gunthorpe <>, Jens Axboe <>,
        Jonathan Corbet <>,
        Jérôme Glisse <>,
        "Kirill A . Shutemov" <>,
        Magnus Karlsson <>,
        Mauro Carvalho Chehab <>,
        Michael Ellerman <>,
        Michal Hocko <>,
        Mike Kravetz <>,
        Paul Mackerras <>,
        Shuah Khan <>,
        Vlastimil Babka <>, <>,
        <>, <>,
        <>, <>,
        <>, <>,
        <>, <>,
        <>, <>,
        <>, LKML <>,
        Mike Rapoport <>
Subject: Re: [PATCH v12 11/22] mm/gup: introduce pin_user_pages*() and

On 1/15/20 7:30 AM, Christoph Hellwig wrote:
> On Tue, Jan 07, 2020 at 02:45:47PM -0800, John Hubbard wrote:
>> Introduce pin_user_pages*() variations of get_user_pages*() calls,
>> and also pin_longterm_pages*() variations.
>> For now, these are placeholder calls, until the various call sites
>> are converted to use the correct get_user_pages*() or
>> pin_user_pages*() API.
> What do the pure placeholders buy us?  The API itself looks ok,
> but until it actually is properly implemented it doesn't help at
> all, and we've had all kinds of bad experiences with these sorts
> of stub APIs.

Hi Christoph,

Absolutely agreed, and in fact, after spending some time in this area I 
am getting a much better understanding of just how problematic "this will 
be used soon" APIs really are. However, this is not quite that case.

The following things make this different from a "pure placeholder" API:

1) These APIs are all exercised in the following patches in this series, 
unless I've overlooked one, and

2) The pages are actually tracked in the very next patch that I want to
post. That patch was posted as part of the v11 series [1], but 
Leon Romanovsky reported a problem with it, and so I'm going to add in
the ability to handle larger "pin" refcounts for the huge page cases.

Meanwhile, I wanted to get these long-simmering simpler preparatory
patches submitted, because it's clear that the API is unaffected by the
huge page refcount fix. (That fix will likely use the second struct page of
the compound page, to count up higher.)

    [PATCH v11 23/25] mm/gup: track FOLL_PIN pages

John Hubbard

Powered by blists - more mailing lists