This commit is contained in:
gferg 2006-09-25 12:03:34 +00:00
parent 0125eac0b7
commit 6efa959449
4 changed files with 40 additions and 20 deletions

View File

@ -2674,7 +2674,7 @@ This HOWTO has been removed for review. </Para>
Module-HOWTO</ULink>,
<CiteTitle>Linux Loadable Kernel Module HOWTO</CiteTitle>
</Para><Para>
<CiteTitle>Updated: Mar 2006</CiteTitle>.
<CiteTitle>Updated: Sep 2006</CiteTitle>.
Explains what Linux loadable kernel modules (LKMs) are,
and how to use and create them. </Para>
</ListItem>

View File

@ -517,7 +517,7 @@ Crash Dump) package. </Para>
Module-HOWTO</ULink>,
<CiteTitle>Linux Loadable Kernel Module HOWTO</CiteTitle>
</Para><Para>
<CiteTitle>Updated: Mar 2006</CiteTitle>.
<CiteTitle>Updated: Sep 2006</CiteTitle>.
Explains what Linux loadable kernel modules (LKMs) are,
and how to use and create them. </Para>
</ListItem>

View File

@ -335,7 +335,7 @@ point for more information. </Para>
Module-HOWTO</ULink>,
<CiteTitle>Linux Loadable Kernel Module HOWTO</CiteTitle>
</Para><Para>
<CiteTitle>Updated: Mar 2006</CiteTitle>.
<CiteTitle>Updated: Sep 2006</CiteTitle>.
Explains what Linux loadable kernel modules (LKMs) are,
and how to use and create them. </Para>
</ListItem>

View File

@ -17,9 +17,17 @@
</author>
<pubdate>2006-03-03</pubdate>
<pubdate>2006-09-24</pubdate>
<revhistory>
<revision>
<revnumber>v1.09</revnumber>
<date>2006-09-24</date>
<authorinitials>bjh</authorinitials>
<revremark>
Fix typos.
</revremark>
</revision>
<revision>
<revnumber>v1.08</revnumber>
<date>2006-03-03</date>
@ -722,7 +730,7 @@ and/or did not define the <literal>MODULE></literal> macro.
<literal>MODULE</literal> is intended to be set via the compile
command (<literal>-DMODULE</literal>) and determine whether the
compilation produces an LKM or an object file for binding into the
base kernel. If your module is like most modern modules and can by
base kernel. If your module is like most modern modules and can be
built <emphasis>only</emphasis> as an LKM, then you should just define
it in your source code (<literal>#define MODULE</literal>) before you
include <filename>include/module.h</filename>.
@ -2035,10 +2043,10 @@ as for any other part of the kernel.
The memory where an LKM resides is a little different from that where
the base kernel resides. The base kernel is always loaded into one
big contiguous area of real memory, whose real addresses are equal to
is virtual addresses. That's possible because the base kernel is the
its virtual addresses. That's possible because the base kernel is the
first thing ever to get loaded (besides the loader) -- it has a wide
open empty space in which to load. And since the Linux kernel is not
pageable, it stays in it's homestead forever.
pageable, it stays in its homestead forever.
</para>
<para>
By the time you load an LKM, real memory is all fragmented -- you
@ -2051,6 +2059,17 @@ pageable</emphasis>. The LKM gets loaded into real page frames from
the start, and stays in those real page frames until it gets unloaded.
</para>
<para>
This design is based on the principle that it's much easier to get a
large contiguous area of virtual memory than to get a large contiguous
area of real memory because there is orders of magnitude more virtual
address space than real memory. In the early days of virtual memory,
that was certainly true -- a 32 bit machine had a 4GiB virtual address
space and rarely more than 64 MiB of real memory. Now, however, it's
quite often just the reverse, with virtual address space being the
constrained resource. So this LKM loading strategy may not make sense
on your system.
</para>
<para>
Some CPUs can take advantage of the properties of the base kernel to
effect faster access to base kernel memory. For example, on one
machine, the entire base kernel is covered by one page table entry
@ -2577,12 +2596,12 @@ something that people believe people are naturally entitled to.
</para>
<para>
The primary that copyright seeks to bring about is that an author gets
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:
I causes the author to create in the first place. An author is more
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.
</para>
@ -2611,9 +2630,9 @@ 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 on a
birthday card, that is a derivative work of all the Dilbert strips,
books, etc.
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.
</para>
<para>
@ -2634,7 +2653,7 @@ 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 hold copyright on a very small part of Linux.
owner, but he holds copyright on a very small part of Linux.
</para>
<para>
@ -2697,7 +2716,7 @@ 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 whole with the
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
@ -2707,7 +2726,7 @@ 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, the so must be writing an LKM. LKMs often have to be updated
work, then so must be writing an LKM. LKMs often have to be updated
to conform to updates the base kernel.
</para>
@ -2744,7 +2763,7 @@ here and a judge will have to draw a line somewhere.
<para>
But if you need to make a practical decision, consider that there have
been well-known binary LKMs (drivers for Nvidia network adapters seem
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.
@ -2754,9 +2773,10 @@ 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 &quot;GPL_ONLY&quot; in their names,
making this intent obvious, 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. </para>
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.
</para>
<para>
These probably have no legal significance. If the LKM is not a
@ -2766,7 +2786,7 @@ and distributing it binary-only anyhow. If the LKM
<Emphasis>is</Emphasis> 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
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.
</para>