9

In the linux kernel, several symbols are exported with EXPORT_GPL_ONLY, and as a result are only available if your kernel module contains MODULE_LICENSE("GPL"). Do either of those have any legal meaning? Can I create a proprietary kernel module that uses gpl-only symbols?

1
  • 2
    If you need a legal opinion, you need to pay a lawyer for it. We are not lawyers here (standard IANAL, TINLA). However, I think this is there specifically so that you need to use the GPL license when distributing a module that uses that code.
    – MAP
    Jul 20, 2016 at 0:12

2 Answers 2

9

According to what Linus says his lawyers say, this is a means of "codifying the intention in the code itself", so it does have legal significance.

For more information, you should read the LWN.net article itself, as well as Linus's response.

Kernel modules depend on Linux's internal symbols to work, and it's uncertain whether they count as a derivative work of Linux, and therefore must be offered under a GPL-compatible license. The various EXPORT_SYMBOL macros are a way of signalling what a majority of kernel developers consider the boundary. So what does this mean in practice?

  • You can certainly circumvent this macro, for example by modifying Linux code and renaming all EXPORT_SYMBOL_GPL into EXPORT_SYMBOL and use the symbols in your GPL-incompatible kernel module, but then it would be easy to argue that you wilfully infringed on copyright, and will be liable for treble damages.
  • Conversely, if you only used the non-GPL symbols and were somehow taken to court, it will be easier to argue that you were given implicit permission.
4

In the linux kernel, several symbols are exported with EXPORT_GPL_ONLY, and as a result are only available if your kernel module contains MODULE_LICENSE("GPL"). Do either of those have any legal meaning?

Yes. Every lawyer I consulted with on the topic were mostly consistent on their interpretation and with the excellent answer from @congusbongus

Short of any other license statement, I would interpret the MODULE_LICENSE("GPL") macro as: this code is available under the GPL.

Short of any other indication, a symbol exported as GPL-only is something I would interpret as: by using this symbol, I agree that my code is derived from GPL-licensed code and should be under released under the GPL or a GPL-compatible license: I state my agreement by having to explicitly create the proper MODULE_LICENSE macro.

Can I create a proprietary kernel module that uses gpl-only symbols?

I would say no.

In general LKMs should be licensed under a GPL or GPL-compatible license. And very few lawyers would support a theory that LKMs can be proprietary. And when they do so, this is usually only for very specific cases. And in these few cases where they may consider it sometimes acceptable, they would consider using GPL-only symbols in an exceptional proprietary module a strict no-no as this would be a rather conflicted position to support. If a lawyer would have another take, I would seriously question their understanding and knowledge of the domain.

Note that this is also a problem faced by FLOSS kernel developers such as for the AFS (Andrew File System) which is CPL-licensed (and they can hardly relicense it for several historical reasons). The actual non-GPL symbols available to their open source project is limited (and as a side note eventually shrinking as the trend is towards more GPL-only symbols).

My personal advice: when I create kernel modules, I would use the GPL or a dual GPL/BSD, especially for the user-space headers.

If I were to create proprietary code (which I would not in this context) that would be in userspace, not in kernel space.

In conclusion, use the GPL for LKMs and be happy!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.