lkml.org 
[lkml]   [2020]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v5 08/15] mm: Add unsafe_follow_pfn
    On Mon, Nov 2, 2020 at 8:29 AM Christoph Hellwig <hch@infradead.org> wrote:
    >
    > On Fri, Oct 30, 2020 at 11:08:08AM +0100, Daniel Vetter wrote:
    > > Also mark up follow_pfn as EXPORT_SYMBOL_GPL. The only safe way to use
    > > that by drivers/modules is together with an mmu_notifier, and that's
    > > all _GPL stuff.
    >
    > I also think it also needs to be renamed to explicitly break any existing
    > users out of tree or int the submission queue.

    Ok I looked at the mmu notifier locking again and noticed that
    mm->subscriptions has its own spinlock. Since there usually shouldn't
    be a huge pile of these I think it's feasible to check for the mmu
    notifier in follow_pfn. And that would stuff this gap for good. I'll
    throw that on top as a final patch and see what people think.
    -Daniel
    --
    Daniel Vetter
    Software Engineer, Intel Corporation
    http://blog.ffwll.ch

    \
     
     \ /
      Last update: 2020-11-02 13:57    [W:4.037 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site