diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:06 +0000 |
commit | 9a6ff5bc53dedbaa601a1a76cbaf8a76afd60c9f (patch) | |
tree | 1c80e4f6b85d6c7980c78af2826bb7beeea0e1de /man2/init_module.2 | |
parent | Adding upstream version 6.05.01. (diff) | |
download | manpages-9a6ff5bc53dedbaa601a1a76cbaf8a76afd60c9f.tar.xz manpages-9a6ff5bc53dedbaa601a1a76cbaf8a76afd60c9f.zip |
Adding upstream version 6.7.upstream/6.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man2/init_module.2')
-rw-r--r-- | man2/init_module.2 | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/man2/init_module.2 b/man2/init_module.2 index a5fed4d..5cc61d0 100644 --- a/man2/init_module.2 +++ b/man2/init_module.2 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH init_module 2 2023-03-30 "Linux man-pages 6.05.01" +.TH init_module 2 2023-10-31 "Linux man-pages 6.7" .SH NAME init_module, finit_module \- load a kernel module .SH LIBRARY @@ -15,14 +15,14 @@ Standard C library .BR "#include <linux/module.h>" " /* Definition of " MODULE_* " constants */" .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" .B #include <unistd.h> -.PP +.P .BI "int syscall(SYS_init_module, void " module_image [. len "], \ unsigned long " len , .BI " const char *" param_values ); .BI "int syscall(SYS_finit_module, int " fd , .BI " const char *" param_values ", int " flags ); .fi -.PP +.P .IR Note : glibc provides no wrappers for these system calls, necessitating the use of @@ -36,7 +36,7 @@ and then runs the module's .I init function. This system call requires privilege. -.PP +.P The .I module_image argument points to a buffer containing the binary image @@ -44,7 +44,7 @@ to be loaded; .I len specifies the size of that buffer. The module image should be a valid ELF image, built for the running kernel. -.PP +.P The .I param_values argument is a string containing space-delimited specifications of the @@ -55,12 +55,12 @@ and The kernel parses this string and initializes the specified parameters. Each of the parameter specifications has the form: -.PP +.P .RI " " name [\c .BI = value\c .RB [ ,\c .IR value ...]] -.PP +.P The parameter .I name is one of those defined within the module using @@ -93,7 +93,7 @@ The .I param_values argument is as for .BR init_module (). -.PP +.P The .I flags argument modifies the operation of @@ -107,7 +107,7 @@ Ignore symbol version hashes. .TP .B MODULE_INIT_IGNORE_VERMAGIC Ignore kernel version magic. -.PP +.P 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 @@ -125,7 +125,7 @@ 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. -.PP +.P Using the .B MODULE_INIT_IGNORE_VERMAGIC flag indicates that the "vermagic" string is to be ignored, and the @@ -177,7 +177,7 @@ or module loading is disabled .I /proc/sys/kernel/modules_disabled in .BR proc (5)). -.PP +.P The following errors may additionally occur for .BR init_module (): .TP @@ -205,7 +205,7 @@ The binary image supplied in .I module_image is not an ELF image, or is an ELF image that is invalid or for a different architecture. -.PP +.P The following errors may additionally occur for .BR finit_module (): .TP @@ -232,7 +232,7 @@ does not refer to an open file. The file referred to by .I fd is opened for read-write. -.PP +.P In addition to the above errors, if the module's .I init function is executed and returns an error, then @@ -250,7 +250,7 @@ Linux. .TP .BR finit_module () Linux 3.8. -.PP +.P The .BR init_module () system call is not supported by glibc. @@ -265,11 +265,11 @@ alternatively, you can invoke the system call using In Linux 2.4 and earlier, the .BR init_module () system call was rather different: -.PP +.P .B " #include <linux/module.h>" -.PP +.P .BI " int init_module(const char *" name ", struct module *" image ); -.PP +.P (User-space applications can detect which version of .BR init_module () is available by calling @@ -277,7 +277,7 @@ is available by calling the latter call fails with the error .B ENOSYS on Linux 2.6 and later.) -.PP +.P The older version of the system call loads the relocated module image pointed to by .I image @@ -288,11 +288,11 @@ The caller is responsible for providing the relocated image (since Linux 2.6, the .BR init_module () system call does the relocation). -.PP +.P The module image begins with a module structure and is followed by code and data as appropriate. Since Linux 2.2, the module structure is defined as follows: -.PP +.P .in +4n .EX struct module { @@ -317,7 +317,7 @@ struct module { }; .EE .in -.PP +.P All of the pointer fields, with the exception of .I next and @@ -330,7 +330,7 @@ Information about currently loaded modules can be found in .I /proc/modules and in the file trees under the per-module subdirectories under .IR /sys/module . -.PP +.P See the Linux kernel source file .I include/linux/module.h for some useful background information. |