Appendix B - GPL
Appendix B - GPL
Appendix B
User-Space Applications
Linus Torvalds made a clarification regarding user-space programs that run on
Linux.
This copyright does *not* cover user programs that use kernel services by
normal system calls - this is merely considered normal use of the kernel,
and does *not* fall under the heading of "derived work." 2
It means that you can write a code from a fresh code base and use services
of Linux and keep your code proprietary. It does not come under GPL and
you need not release the source code either. But you must make sure that
387
388
you are not using any GPL software accidentally in your user-space programs.
The following points should be taken care of.
You must not use source code of any program under GPL in your
application.
You must not link your application with any GPL library either statically
or dynamically. You can link your application with LGPL libraries. Most
of the key libraries in Linux such as libc, pthreads, and so on are released
under LGPL. You can link LGPL libraries in your program with no obligation
to release the applications source code.
Its allowed to use IPC mechanisms between GPL and non-GPL programs.
For example, you can download the DHCP server released under GPL and
write your own DHCP client. You are not obliged to release your DHCP client
under GPL. However, any modifications done by you to any GPL application
and that use the IPC mechanisms to work around GPL are very dangerous.
You must take advice from an attorney in such cases.
Note that GPL only applies when it comes to distributing a program or a
product. You can use any GPL programs, drivers, and so on in any manner
you want as long as its for internal use and not for distribution. For example,
you can use open source debuggers and profilers for debugging your proprietary programs. You can also make modifications to them without releasing
any code as long as they are for internal use.
Thus, user applications can always be kept proprietary in Linux. You only
need to take some precautions while developing applications.
Kernel
There is a general opinion that loadable kernel modules using standard
exported kernel interfaces can be kept safe and need not come under GPL.
For example, you can have proprietary device drivers implemented as a Linux
kernel module and need not release the source code of the driver provided
you use standard interfaces exported by the kernel. However, this is one of
the gray areas and you should consult your attorney.
Listing B.1 shows an excerpt from mail from Linus Torvalds to the kernel
mailing list regarding his view on loadable kernel modules and GPL.
Thus the following points should be taken care of.
Consult your attorney to find out whether you can use loadable kernel
modules to protect your proprietary software.
Any modifications done to the Linux kernel come under GPL.
In the kernel do not export any nonexported kernel interface to support
your loadable module.
Any changes done to the kernel in the form of a kernel patch come under
GPL.
389
Points to Remember
As a manager of a project you should make sure that the developers
understand GPL and other licenses involved in the project.
During development, the developers should take care when using a piece
of software (in the form of a library or some source code) available on
the Net for their project. They should not accidentally violate any licenses
involved. As rightly said, prevention is better than cure.
One point where you must take care is software patent violation. It is
possible that you are using some off-the-shelf source code that is violating
some software patent. These violations are very difficult to catch and you
should be extremely careful.
Listing B.1
Modules
But one gray area in particular is something like a driver that was originally
written for another operating system (i.e. clearly not a derived work of Linux
in origin). At exactly what point does it become a derived work of the kernel
(and thus fall under the GPL)?
THAT is a gray area, and _that_ is the area where I personally believe that
some modules may be considered to not be derived works simply because
they weren't designed for Linux and don't depend on any special Linux
behavior.
Basically:
Anything that was written with Linux in mind (whether it then _also_
works on other operating systems or not) is clearly partially a derived work.
Anything that has knowledge of and plays with fundamental internal Linux
behavior is clearly a derived work. If you need to muck around with core
code, you're derived, no question about it.
390
Notes
1. http://www.gnu.org/philosophy/license-list.html has the complete list. GPL license
can be downloaded from http://www.fsf.org/licensing.
2. See the COPYING file in kernel sources.