Home

MODULELICENSE

MODULE_LICENSE is a macro used in Linux kernel modules to declare the license under which the module is released. The string provided to the macro is metadata that the kernel uses to determine licensing compatibility and to determine how the module should be treated during operation.

Usage is straightforward: place the macro in the module source file, typically near other module metadata. For

The license declaration affects kernel behavior through the module taint mechanism. If a module is declared

Limitations and best practices: MODULE_LICENSE is metadata and does not by itself enforce licensing terms. It

See also: Linux kernel licensing, module taint, GPL-compatible licenses.

example,
MODULE_LICENSE("GPL");
declares
the
module
is
licensed
under
the
GNU
Public
License.
The
kernel
recognizes
licenses
that
are
GPL-compatible,
such
as
"GPL"
or
"Dual
BSD/GPL";
other
license
strings
indicate
non-GPL
or
non-compatible
licenses.
The
exact
set
of
recognized
values
is
defined
by
the
kernel
and
may
vary
over
time.
with
a
GPL-compatible
license,
loading
it
does
not
taint
the
kernel
for
licensing
reasons.
If
the
license
is
not
GPL-compatible
or
is
not
recognized
as
compatible,
loading
the
module
can
taint
the
kernel,
signaling
users
and
administrators
that
proprietary
or
non-approved
code
is
running
in
kernel
space.
This
taint
has
implications
for
debugging
and
support.
should
accurately
reflect
the
actual
license
of
the
module's
code.
When
using
multiple
licenses,
a
compatible
string
like
"Dual
BSD/GPL"
can
be
appropriate.
Misrepresenting
a
license
can
mislead
users
and
complicate
compliance.