Home

MODULEVERSION

MODULEVERSION is a commonly used reference to the version metadata of Linux kernel modules. The canonical mechanism to declare a module version is the MODULE_VERSION macro, not a separate keyword called MODULEVERSION. The two terms are related, but MODULE_VERSION is the exact macro name provided by the kernel headers.

Implementation and purpose: The MODULE_VERSION macro is defined in include/linux/module.h and expands to MODULE_INFO(version, ...). This stores

Usage: To declare a module version, you typically add a line such as MODULE_VERSION("1.0") in the module

Relation to broader versioning: Module versioning in the kernel also involves symbol versioning, which is controlled

Notes: The version string can be any conventional identifier (for example, a release or build number). It

the
provided
string
in
the
module’s
metadata,
in
the
.modinfo
section
under
the
key
version.
This
information
is
intended
for
identification
and
management
of
modules,
not
for
runtime
compatibility
checks
by
the
kernel.
source,
alongside
other
metadata
like
MODULE_LICENSE,
MODULE_AUTHOR,
and
MODULE_DESCRIPTION.
After
compiling
the
module,
tools
like
modinfo
can
display
the
version
string
when
querying
the
module
with
modinfo.ko,
showing
an
output
line
such
as
version:
1.0.
by
CONFIG_MODVERSIONS
and
uses
cryptographic
hashes
to
ensure
compatibility
of
exported
symbols.
The
MODULE_VERSION
string,
by
contrast,
is
an
informational
tag.
It
does
not
by
itself
enforce
compatibility
with
a
particular
kernel
or
other
modules;
that
remains
the
role
of
global
symbol/version
checks
and
digital
signatures
where
applicable.
helps
developers
and
administrators
track
module
revisions
and
packaging,
but
it
is
not
a
security
feature
or
a
guarantee
of
compatibility.