init_module(2) System Calls Manual init_module(2) init_module, finit_module - (libc -lc) #include /* Definition of MODULE_* constants */ #include /* Definition of SYS_* constants */ #include int syscall(unsigned long size; SYS_init_module, void module_image[size], unsigned long size, const char *param_values); int syscall(SYS_finit_module, int fd, const char *param_values, int flags); : glibc syscall(2). init_module() ELF init . . module_image size . ELF . param_values ( module_param() module_param_array()). . : name[ =value [,value...]] name module_param() ( include/linux/moduleparam.h). value bool invbool. . finit_module() finit_module() init_module() fd. . param_values init_module(). flags finit_module(). OR : MODULE_INIT_IGNORE_MODVERSIONS . MODULE_INIT_IGNORE_VERMAGIC . MODULE_INIT_COMPRESSED_FILE ( 5.17) . . . "vermagic" ( ). CONFIG_MODVERSIONS . . "vermagic" . MODULE_INIT_IGNORE_VERMAGIC "vermagic" MODULE_INIT_IGNORE_MODVERSIONS . ( CONFIG_MODULE_FORCE_LOAD) ENOEXEC . CONFIG_MODULE_DECOMPRESS . /sys/module/compression. finit_module() MODULE_INIT_COMPRESSED_FILE. : o gzip ( 5.17) o xz ( 5.17) o zstd ( 6.2) . . 0. -1 errno . EBADMSG ( 3.7) . EBUSY . EFAULT . ENOKEY ( 3.7) . CONFIG_MODULE_SIG_FORCE . ENOMEM . EPERM ( CAP_SYS_MODULE) ( /proc/sys/kernel/modules_disabled proc(5)). init_module(): EEXIST . EINVAL param_values ELF module_image . ENOEXEC module_image ELF ELF . finit_module(): EBADF fd . EFBIG fd . EINVAL flags . EINVAL MODULE_INIT_COMPRESSED_FILE. ENOEXEC fd . EOPNOTSUPP ( 5.17) MODULE_INIT_COMPRESSED_FILE CONFIG_MODULE_DECOMPRESS. ETXTBSY ( 4.7) fd . init init_module() finit_module() errno init. . finit_module() 3.8. init_module() glibc. glibc glibc glibc 2.23 ABI . ( glibc 2.23) syscall(2). 2.4 2.4 init_module() : #include int init_module(const char *name, struct module *image); ( init_module() query_module() ENOSYS 2.6 .) image init . ( 2.6 init_module() ). . 2.2 : struct module { unsigned long size_of_struct; struct module *next; const char *name; unsigned long size; long usecount; unsigned long flags; unsigned int nsyms; unsigned int ndeps; struct module_symbol *syms; struct module_ref *deps; struct module_ref *refs; typeof(int (void)) *init; typeof(void (void)) *cleanup; const struct exception_table_entry *ex_table_start; const struct exception_table_entry *ex_table_end; #ifdef __alpha__ unsigned long gp; #endif }; next refs . /proc/modules /sys/module. include/linux/module.h . create_module(2) delete_module(2) query_module(2) lsmod(8) modprobe(8) 3 . . : . 6.18 8 2026 init_module(2)