1CREATE_MODULE(2)           Linux Programmer's Manual          CREATE_MODULE(2)
2
3
4

NAME

6       create_module - create a loadable module entry
7

SYNOPSIS

9       #include <linux/module.h>
10
11       caddr_t create_module(const char *name, size_t size);
12
13       Note:  No declaration of this system call is provided in glibc headers;
14       see NOTES.
15

DESCRIPTION

17       Note: This system call is present only in kernels before Linux 2.6.
18
19       create_module() attempts to create a loadable module entry and  reserve
20       the  kernel memory that will be needed to hold the module.  This system
21       call requires privilege.
22

RETURN VALUE

24       On success, returns the kernel address at which the module will reside.
25       On error, -1 is returned and errno is set appropriately.
26

ERRORS

28       EEXIST A module by that name already exists.
29
30       EFAULT name is outside the program's accessible address space.
31
32       EINVAL The  requested  size  is  too  small  even for the module header
33              information.
34
35       ENOMEM The kernel could not allocate a contiguous block of memory large
36              enough for the module.
37
38       ENOSYS create_module()  is  not supported in this version of the kernel
39              (e.g., the kernel is version 2.6 or later).
40
41       EPERM  The caller was not privileged (did not have  the  CAP_SYS_MODULE
42              capability).
43

VERSIONS

45       This  system  call is present on Linux only up until kernel 2.4; it was
46       removed in Linux 2.6.
47

CONFORMING TO

49       create_module() is Linux-specific.
50

NOTES

52       This obsolete system call is not supported by glibc.  No declaration is
53       provided  in glibc headers, but, through a quirk of history, glibc ver‐
54       sions before 2.23 did export an ABI for this system  call.   Therefore,
55       in  order  to  employ  this  system call, it was sufficient to manually
56       declare the interface in your code; alternatively, you could invoke the
57       system call using syscall(2).
58

SEE ALSO

60       delete_module(2), init_module(2), query_module(2)
61

COLOPHON

63       This  page  is  part of release 5.04 of the Linux man-pages project.  A
64       description of the project, information about reporting bugs,  and  the
65       latest     version     of     this    page,    can    be    found    at
66       https://www.kernel.org/doc/man-pages/.
67
68
69
70Linux                             2017-09-15                  CREATE_MODULE(2)
Impressum