[lkml]   [2018]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 7/8] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL
On Mon, Jun 18, 2018 at 11:05 PM, Dan Williams <> 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:
> 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" <>
> Cc: Logan Gunthorpe <>
> Reviewed-by: Christoph Hellwig <>
> Signed-off-by: Dan Williams <>

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.


Those entry points also consume / export functionality that is
currently not exported to any other driver.


Andrew, please consider applying this v3 series to fix this up (let me
know if you need a resend).

 \ /
  Last update: 2018-07-07 01:55    [W:0.188 / U:2.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site