Hacker News new | ask | show | jobs
by HarrisonFisk 4629 days ago
Why would the license matter for a kernel module? You know that the linux kernel is also GPL v2 right?
1 comments

How about the usual reason? Because it can't be pulled into non-GPL projects.

This is actually relevant, at least, to me. I've been porting Twitter's fatcache[1] to iOS, and wouldn't be if it was GPL'd. I haven't even looked at Facebook's code, due to the GPL license, which makes it—literally—unusable to me on iOS and Android.

[1] https://github.com/twitter/fatcache

It is possible to make a legal argument that a Linux-specific device driver is in fact derivative of the Linux kernel code that it interacts with. If said argument is made, then no matter what the author of said code says, it may actually be forced to be GPL v2.

I am not a lawyer, and I have no real idea how likely said argument is to hold up in an actual court. It also seems unlikely that anyone would actually file a lawsuit about this sort of stuff. But if you want to be as careful as you can be, you won't go wrong if you use the GPL v2 on principle for a Linux device driver.

On this topic it is worth noting that Linus Torvalds has stated different seeming opinions at different times. In general as more and more of the Linux kernel has been made available to loadable modules, he's become less and less inclined towards the argument that they are not derivative works. See http://linuxmafia.com/faq/Kernel/proprietary-kernel-modules.... for a comparison of his views at two points in time. (I don't know his current views.)

IANAL, but if you create a derivative work of GPL v2 code you have to release it as GPL v2. This doesn't mean you, the copyright holder, cannot release it also with another license. The GPL forces you to ensure that people can use your extension of the original code with the same rules of the original code.

In case of kernel modules, if you distribute a binary built with kernel headers (like distributions do, then the sources of that kernel module have to be available under the the GPL license.

But if you distribute the sources of a kernel module, and each user compiles it, you can legally load it into a kernel without breaking the GPL. That's how ZFS can legally run on linux as a native module. I don't know if that's really necessary, but better safe than sorry.

Distributions can automate this compilation step so that from the point of view of the end user it doesn't make any difference, just a nuisance to the package maintainers (and yes, a few more mb of downloads for compilers and such).

IANAL, but if you create a derivative work of GPL v2 code you have to release it as GPL v2. This doesn't mean you, the copyright holder, cannot release it also with another license.

Sorry, not true.

The whole point of it being a derivative work is that someone else is also a copyright owner. If you release under a different license, you're saying that you give permission on their work. You can SAY that, but you're wrong.

What qualify as a derivative is always a complicated issue. FSF and Linus Torvalds have both given their opinions about it, but it really is up to the court to decide if a kernel module relies on the kernel. They would ask if a kernel is module based on the functionality of the kernel, to the point where it expands on what the kernel do.

Words like based, expand, and relies on is keywords that the judge or jury would look at in identifying if something is a derivative work. A kernel module would likely have to pass each to not be declared as derivative.

The word "linking" or "loadable modules" however is not part of copyright, and would only come into question regarding the intent of the author. One could argue that thanks to linus posts, it shows that his intention is to allow such actions under non-gpl terms even if the module would be a derivative work under copyright law. That would however be limited to code that linus himself has written.

As the copyright holder of a specific work, you can license the said work any way you like (GPLv2, Commercial, BSD, Apache, et cetera). Dual licensing [1] is not out of the question.

[1] http://en.wikipedia.org/wiki/Multi-licensing

It's indeed terribly unfortunate that you can't take free software and make it nonfree.
But it is kernel code. Would you expect it to be trivial to port a device mapper kernel module from Linux to Darwin? Seems like a bit of a stretch