Re: [PATCH] x86/mm: Unbreak modules that rely on external PAGE_KERNEL availability

From: Linus Torvalds
Date: Wed Nov 08 2017 - 16:09:36 EST


On Wed, Nov 8, 2017 at 12:47 PM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> Despised-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

So I despise the patch for a different reason: I hate it when we
export data symbols like this.

But that's independent of the GPL-vs-not issue, and it's not like this
is the first time it happens.

Generally we should export _functionality_, not data.

The fact that we need to export access to some random global data that
we then use in an inline function or macro to me says that the code
was not designed right to begin with.

But yeah, I guess we can't fix that easily as-is, and people who just
randomly slap _GPL() on the export should stop doing that. It's *not*
a default thing, quite the reverse. It should be something that is so
core - but also so _meaningful_ - that using it is a big flag that
you're not just a random driver or something.

So slapping _GPL on some random piece of data that that doesn't
actually imply anything at all for copyright derivation is
fundamentally broken and stupid.

Linus