From: Andrew Morton <akpm@linux-foundation.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>,
"Logan Gunthorpe" <logang@deltatee.com>,
"Christoph Hellwig" <hch@lst.de>, "Linux MM" <linux-mm@kvack.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 7/8] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL
Date: Mon, 9 Jul 2018 17:34:17 -0700 [thread overview]
Message-ID: <20180709173417.171c0d75ac3fd55b45881d3f@linux-foundation.org> (raw)
In-Reply-To: <CAPcyv4hCZ6jJkB=BLfoEn6146k7FG32=3J8ussZDXmAScQJkAg@mail.gmail.com>
On Fri, 6 Jul 2018 16:53:11 -0700 Dan Williams <dan.j.williams@intel.com> wrote:
> On Mon, Jun 18, 2018 at 11:05 PM, Dan Williams <dan.j.williams@intel.com> wrote:
> > The routines hmm_devmem_add(), and hmm_devmem_add_resource() are
> > now wrappers around the functionality provided by devm_memremap_pages() to
> > inject a dev_pagemap instance and hook page-idle events. The
> > devm_memremap_pages() interface is base infrastructure for HMM which has
> > more and deeper ties into the kernel memory management implementation
> > than base ZONE_DEVICE.
> >
> > Originally, the HMM page structure creation routines copied the
> > devm_memremap_pages() code and reused ZONE_DEVICE. A cleanup to unify
> > the implementations was discussed during the initial review:
> > http://lkml.iu.edu/hypermail/linux/kernel/1701.2/00812.html
> >
> > Given that devm_memremap_pages() is marked EXPORT_SYMBOL_GPL by its
> > authors and the hmm_devmem_{add,add_resource} routines are simple
> > wrappers around that base, mark these routines as EXPORT_SYMBOL_GPL as
> > well.
> >
> > Cc: "Jérôme Glisse" <jglisse@redhat.com>
> > Cc: Logan Gunthorpe <logang@deltatee.com>
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>
> Currently OpenAFS is blocked from compiling with the 4.18 series due
> to the current state of put_page() inadvertently pulling in GPL-only
> symbols. This series, "PATCH v3 0/8] mm: Rework hmm to use
> devm_memremap_pages and other fixes" corrects that situation and
> corrects HMM's usage of EXPORT_SYMBOL_GPL.
>
> If HMM wants to export functionality to out-of-tree proprietary
> drivers it should do so without consuming GPL-only exports, or
> consuming internal-only public functions in its exports.
>
> In addition to duplicating devm_memremap_pages(), that should have
> been EXPORT_SYMBOL_GPL from the beginning, it is also exporting /
> consuming these GPL-only symbols via HMM's EXPORT_SYMBOL entry points.
>
> mmu_notifier_unregister_no_release
> percpu_ref
> region_intersects
> __class_create
>
> Those entry points also consume / export functionality that is
> currently not exported to any other driver.
>
> alloc_pages_vma
> walk_page_range
>
> Andrew, please consider applying this v3 series to fix this up (let me
> know if you need a resend).
A resend would be good. And include the above info in the changelog.
I can't say I'm terribly happy with the HMM situation. I was under the
impression that a significant number of significant in-tree drivers
would be using HMM but I've heard nothing since, apart from ongoing
nouveau work, which will be perfectly happy with GPL-only exports.
So yes, we should revisit the licensing situation and, if only nouveau
will be using HMM we should revisit HMM's overall usefulness.
next prev parent reply other threads:[~2018-07-10 0:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 6:04 [PATCH v3 0/8] mm: Rework hmm to use devm_memremap_pages and other fixes Dan Williams
2018-06-19 6:04 ` [PATCH v3 1/8] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL Dan Williams
2018-06-19 6:04 ` [PATCH v3 2/8] mm, devm_memremap_pages: Kill mapping "System RAM" support Dan Williams
2018-06-19 6:04 ` [PATCH v3 3/8] mm, devm_memremap_pages: Fix shutdown handling Dan Williams
2018-06-19 16:00 ` Logan Gunthorpe
2018-06-19 6:04 ` [PATCH v3 4/8] mm, devm_memremap_pages: Add MEMORY_DEVICE_PRIVATE support Dan Williams
2018-06-19 6:05 ` [PATCH v3 5/8] mm, hmm: Use devm semantics for hmm_devmem_{add, remove} Dan Williams
2018-06-19 6:05 ` [PATCH v3 6/8] mm, hmm: Replace hmm_devmem_pages_create() with devm_memremap_pages() Dan Williams
2018-06-19 6:05 ` [PATCH v3 7/8] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL Dan Williams
2018-07-06 23:53 ` Dan Williams
2018-07-10 0:34 ` Andrew Morton [this message]
2018-07-10 17:11 ` Jerome Glisse
2018-06-19 6:05 ` [PATCH v3 8/8] mm: Fix exports that inadvertently make put_page() EXPORT_SYMBOL_GPL Dan Williams
2018-06-19 6:59 ` John Hubbard
2018-07-05 14:51 ` Joe Gorse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180709173417.171c0d75ac3fd55b45881d3f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=hch@lst.de \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=logang@deltatee.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox