Skip to contentSkip to conversation

MODULE_LICENSE and EXPORT_SYMBOL_GPL

DISCUSSION Keith Owens 4 participants 4 messages Oct 18, 2001 – Oct 19, 2001

lore
Share & tools
lore
#0 lore raw

That has been a lot of uninformed and confused comment on l-k about MODULE_LICENSE and EXPORT_SYMBOL_GPL. I will try to make this as simple as possible, to improve the signal to noise ration on this list.

Don't bother cc'ing me on any replies. Also I don't care what your view of the GPL is or should be.

MODULE_LICENSE

MODULE_LICENSE() allows kernel developers to identify kernels that have been tainted by modules whose source code is not generally available. No source code means that only the supplier can debug the problem so send the bug report to them, not l-k. Precisely which license string indicates that source is freely available is still being fine tuned.

A module without a license must be assumed to be proprietary. Not all existing modules have a MODULE_LICENSE() yet but most do, the rest are not far behind. For code that is not in the standard kernel tree, it is up to the supplier to set the license string accordingly. I recommend that binary only modules contain a string like :-

MODULE_LICENSE("Proprietary. Send bug reports to joe.bloggs@somewhere")

Modutils marks the kernel as tainted when it loads a module without a GPL compatible MODULE_LICENSE(), reporting the license string so users know where to send bug reports. Oops reports the tainted status of the kernel. Kernel developers can decide if they want to look at tainted bug reports or not. End of story.

Somebody raised the red herring of linking proprietary code into the kernel. If you compile and link code into the kernel and do not provide the source then you cannot distribute the resulting kernel. To do so is a breach of GPL conditions, read the GPL if you don't believe me. There is nothing to stop you building your own kernel with binary only code and using it internally, but any bugs are your problem and you cannot distribute the result.

EXPORT_SYMBOL_GPL

Some kernel developers are unhappy with providing external interfaces to their code, only to see those interfaces being used by binary only modules. They view it as their work being appropriated. Whether you agree with that view or not is completely irrelevant, the person who owns the copyright decides how their work can be used.

EXPORT_SYMBOL_GPL() allows for new interfaces to be marked as only available to modules with a GPL compatible license. This is independent of the kernel tainting, but obviously takes advantage of MODULE_LICENSE() strings.

EXPORT_SYMBOL_GPL() may only be used for new exported symbols, Linus has spoken. I believe the phrase involved killer penguins with chainsaws for anybody who changed existing exported interfaces.

System calls are not affected and cannot be, that is yet another red herring. Anybody who thinks otherwise does not understand the GPL. System calls define how user space code accesses the kernel, nobody pretends that a binary only user space program cannot use a syscall.

#1 lore raw
Quoted 3 lines · Keith Owens

EXPORT_SYMBOL_GPL() may only be used for new exported symbols, Linus has spoken. I believe the phrase involved killer penguins with chainsaws for anybody who changed existing exported interfaces.

... and if somebody thinks that replacing

int foo(void *bar);
plus
EXPORT_SYMBOL(foo);

with

int __foo(void *bar, int baz);
static int foo(void *bar)

{
	return __foo(bar, 0);
}

plus
EXPORT_SYMBOL_GPL(__foo);

is going to save you from aforementioned killer penguins, keep in mind that there are worse and slower ways to go and you might not like learning them first-hand.

Al "have pincer, will travel" Viro

#2 lore raw
In reply to Keith Owens

[email protected] (Keith Owens) wrote on 18.10.01 in <[email protected]>:

Quoted 4 lines

EXPORT_SYMBOL_GPL() allows for new interfaces to be marked as only available to modules with a GPL compatible license. This is independent of the kernel tainting, but obviously takes advantage of MODULE_LICENSE() strings.

Incidentally, an argument can be made that using EXPORT_SYMBOL_GPL actually renders your code incompatible with the GPL, insofar as it violates the "additional restriction" clause. Which doesn't matter as long as it's *only* your code (author can always do different things), but *does* matter if you add *other* people's GPL code (such as the rest of the kernel), because it's *their* GPL that you're breaking ...

MfG Kai

#3 lore raw
Quoted 7 lines · Kai Henningsen

[email protected] (Keith Owens) wrote on 18.10.01 in <[email protected]>:

Quoted 4 lines

EXPORT_SYMBOL_GPL() allows for new interfaces to be marked as only available to modules with a GPL compatible license. This is independent of the kernel tainting, but obviously takes advantage of MODULE_LICENSE() strings.

Quoted 6 lines

Incidentally, an argument can be made that using EXPORT_SYMBOL_GPL actually renders your code incompatible with the GPL, insofar as it violates the "additional restriction" clause. Which doesn't matter as long as it's *only* your code (author can always do different things), but *does* matter if you add *other* people's GPL code (such as the rest of the kernel), because it's *their* GPL that you're breaking ...

[IANAL]

Not the least -- there is no such thing as code "(in)compatible with the GPL" -- you can alter (or write) GPLed code to do (or don't do) anything you want when it comes to the GPL. The additional restrictions provision in the GPL you talk about means restrictions in licensing, not technical ones. For what it's worth I could alter the glibc to not work when used by a process called "acroread" or "vmware" or whatever (not that that would make sense) and still be in full compliance with the GPL as long as I adhere to the GPL when distributing it.

Nils

Signature · 5 lines
 Nils Philippsen / Berliner Straße 39 / D-71229 Leonberg //
+49.7152.209647
[email protected] / [email protected] /
[email protected]
        Ever noticed that common sense isn't really all that common?