13. Copyright Considerations With LKMs

A perennial question about LKMs is whether the terms of GPL apply to one, considering that the Linux kernel is distributed under GPL. For example, is it OK to ship an LKM in binary only form? This section covers the copyright issues surrounding LKMs, which are as interesting as they are complex. Fair warning: we don't reach a conclusion. The law is unsettled and there are plenty of good but conflicting arguments.

Remember that countries have varying copyright laws, so even if you figure out the answer to a question in one country, it might be different in another. But copyright laws are actually remarkably similar, and this section won't go into the matter in enough detail that it will really make a difference.

Let's start at the beginning and look at what a copyright is.

Primarily, a copyright is a person's right to stop other people from copying something. It is a legal right, not a moral one. That means it is created by law to bring about some practical effect, rather than something that people believe people are naturally entitled to.

The primary effect that copyright seeks to bring about is that an author gets paid for what he created. Some people believe that is a valid goal itself, because an author has a natural right to the value that he creates. But historically, that isn't the real goal of copyright. The real goal is secondary to making the author get paid for his work: It causes the author to create in the first place. An author is more likely to spend time and money writing if he will get paid for it.

The actual operation of copyright law achieves that goal only approximately. We've all seen cases where the law is used to transfer wealth in ways that don't contribute to that goal at all. For example, a music publisher denies a person permission to copy a song that he wouldn't have paid for anyway. Legislators think of that as collateral damage -- what copyright law does to cause things to get written makes up for the senseless copy restrictions in other cases.

But when it comes to LKMs, there is another, much more complex area of copyright law that matters: derivative works. Copyright law gives an author the right to stop someone from creating a derivative work. A derivative work is not a copy of anything the author wrote. So what is it?

The definition of derivative work is elusive, but here are some examples: When you translate a book from English into French, the French version is a derivative work of the English work. If you write a new chapter for a novel, your new chapter is a derivative work of the novel. If you write a whole new book for the Harry Potter series, with the same characters and settings, that is a derivative work of all the Harry Potter books. If you draw a Dilbert cartoon you thought of on a birthday card, that is a derivative work of all the Dilbert strips, books, etc.

And this brings us to LKMs, because many people believe that an LKM is a derivative work of the Linux kernel. The Free Software Foundation has said so. Linus Torvalds has said it is sometimes. No court of law has ever ruled one way or the other.

Now let's turn to the copyright on Linux. For the sake of discussion, when we say "Linux," we will mean the contents of the tarball you download from kernel.org as the regular Linux kernel.

Who owns the copyright on Linux? Lots of people. Nearly everyone who has contributed code to Linux reserved his own copyright. Some of that work was done for hire and therefore the employing corporations own the copyright. Linus Torvalds is the most visible copyright owner, but he holds copyright on a very small part of Linux.

How do these people prosecute their copyright? Well, nobody makes deals with them to purchase copying rights. It wouldn't be practical. However, they all offer a copyright license -- the same one -- to the public. The license is documented and offered in a file in the tarball, and is known as the General Public License (GPL). GPL is not specific to Linux. It was developed by the Free Software Foundation before Linux existed, and was simply chosen by Linus back when he was the only copyright owner. And Linus doesn't put any code into the tarball without the author offering the same license.

A copyright license is permission by a copyright owner to do something that he has a legal right to stop you from doing, such as make a copy or a derivative work. What it means to be a public license is that it is offered to the public, as opposed to the copyright owner offering it to particular persons he knows about.

The GPL lets you do almost anything with the code -- it's almost like the copyright owners waiving all their copyright rights. But not quite: there are strings attached. The license has conditions. In order to have the permission, you have to meet the conditions. The condition we care about here is one of two things, or both, depending on how you read the license document (the document is ambiguous). Either a) if you distribute a derivative work of Linux, you have to supply source code for the whole derivative work; or b) if you distribute a work containing Linux, you have to supply source code for the entire work.

Now we come to the real question: what sort of rights do you have to distribute an LKM you wrote?

Certainly, many people believe that you can distribute an LKM under any terms you like, including binary-only and the owners of the Linux copyright have nothing to say about it. You're distributing nothing but your own code. And it's not a derivative work of anything. Many people do distribute binary-only LKMs and believe that a principle benefit of LKMs is the ability to do that.

Others think differently: The LKM, while an original work, is a derivative work of Linux. The Linux copyright owners have the right to control distribution. The only permission they gave you to distribute it is GPL, and that permission is only under the condition that you supply source code.

Let's look a little closer at the issue of whether an LKM is a derivative work of Linux. The argument in favor goes that writing an LKM is like writing a supplemental chapter for a novel. We know the latter is creating a derivative work. The LKM is like the chapter because it's specifically designed to be part of a whole with the existing Linux kernel. It has no use in any other context, and when deployed, is tightly woven into the rest of Linux. The fact that you typically use a bunch of Linux header files to compile it is proof that it's just an extension of Linux (don't confuse this with another argument -- that the #include actually means you're distributing that header file inside your object code). And note that a kernel module loaded at run time is essentially the same program you would statically bind into the base kernel if you chose to go that route. If writing a module for the Linux source tree is creating a derivative work, then so must be writing an LKM. LKMs often have to be updated to conform to updates the base kernel.

Wasabi Systems, a company that sells kernels with freer licensing than Linux, has published a paper that argues in more detail that LKMs are derivative works of Linux and you should therefore be wary of publishing binary-only LKMs for it.

The argument against says that an LKM is something that interacts with Linux, not something that is part of Linux. It likens the LKM to a user space program, communicating with the kernel via system calls, or an FTP client program (which would not be a derivative work of any FTP server program).

The issue also runs into one of those areas where books and computer programs aren't analogous because a computer program does something, whereas a book just communicates an idea to a person. Loading an LKM might be more like plugging an attachment into your vacuum cleaner than like inserting pages into your book. And we know that the blueprints for a vacuum cleaner attachment are not a derivative work of the blueprints for a vacuum cleaner.

So that's as far as I can go. There appears to be a matter of degree here and a judge will have to draw a line somewhere.

But if you need to make a practical decision, consider that there have been well-known binary LKMs (drivers for Nvidia video adapters seem to be the most famous) for years and no one has sued for copyright infringement. Also, Linus Torvalds, influential for reasons other than legal, has said binary-only LKMs are OK with him.

What about GPL-ONLY symbols? Kernel developers have selected some symbols that one uses in interfacing an LKM to the base kernel as GPL-only. These symbols have "GPL_ONLY" in their names, making this intent obvious. Furthermore, in order for the Linux module loader to let your LKM use them, you must include some code in your LKM that supposedly certifies you license your module under GPL.

These probably have no legal significance. If the LKM is not a derivative work of Linux, then the kernel developers simply have no legal way to block you from putting the GPL annotation in your code and distributing it binary-only anyhow. If the LKM is a derivative work of Linux, then the absence of the GPL-only classification of the symbol is probably not enough to give permission to use it in a binary-only LKM. The license document does not mention them. At best, you can use GPL-only symbols as a gentleman's promise not to sue you for use of all the other symbols in a binary-only LKM.

Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout