aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2013-01-06 16:39:53 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2013-01-10 01:57:28 +0100
commit98a683a78542d4ef62c5cdf8bb48304e52047587 (patch)
treeda1981d3591175539cc7baa010fa9b5931595f49
parent2038a83d74c2916ce6ccd7e1f1ec62985495f6f6 (diff)
downloadman-pages-98a683a78542d4ef62c5cdf8bb48304e52047587.tar.gz
init_module.2: Document finit_module() 'flags' argument
Document MODULE_INIT_IGNORE_MODVERSIONS and MODULE_INIT_IGNORE_VERMAGIC. (Some edits by mtk.) Reviewed-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/init_module.231
1 files changed, 30 insertions, 1 deletions
diff --git a/man2/init_module.2 b/man2/init_module.2
index 10e71e2637..9d1098acf3 100644
--- a/man2/init_module.2
+++ b/man2/init_module.2
@@ -113,10 +113,39 @@ together zero or more of the following flags:
.\" commit 2f3238aebedb243804f58d62d57244edec4149b2
.TP
.B MODULE_INIT_IGNORE_MODVERSIONS
-Ignore module versions.
+Ignore symbol version hashes.
.TP
.B MODULE_INIT_IGNORE_VERMAGIC
Ignore kernel version magic.
+.PP
+There are some safety checks built into a module to ensure that
+it matches the kernel against which it is loaded.
+.\" http://www.tldp.org/HOWTO/Module-HOWTO/basekerncompat.html
+.\" is dated, but informative
+These checks are recorded when the module is built and
+verified when the module is loaded.
+First, the module records a "vermagic" string containing
+the kernel version number and prominent features (such as the CPU type).
+Second, if the module was built with the
+.B CONFIG_MODVERSIONS
+configuration option enabled,
+a version hash is recorded for each symbol the module uses.
+This hash is based on the types of the arguments and return value
+for the function named by the symbol.
+In this case, the kernel version number within the
+"vermagic" string is ignored,
+as the symbol version hashes are assumed to be sufficiently reliable.
+
+Using the
+.B MODULE_INIT_IGNORE_VERMAGIC
+flag indicates that the "vermagic" string is to be ignored, and the
+.B MODULE_INIT_IGNORE_MODVERSIONS
+flag indicates that the symbol version hashes are to be ignored.
+If the kernel is built to permit forced loading (i.e., configured with
+.BR CONFIG_MODULE_FORCE_LOAD ),
+then loading will continue, otherwise it will fail with
+.B ENOEXEC
+as expected for malformed modules.
.SH "RETURN VALUE"
On success, these system calls return 0.
On error, \-1 is returned and