]>
Commit | Line | Data |
---|---|---|
c4d4162c | 1 | .\" Copyright (C) 1996 Free Software Foundation, Inc. |
2297bf0e | 2 | .\" |
95fb8859 | 3 | .\" SPDX-License-Identifier: GPL-1.0-or-later |
c4d4162c | 4 | .\" |
c13182ef | 5 | .\" 2006-02-09, some reformatting by Luc Van Oostenryck; some |
c4d4162c MK |
6 | .\" reformatting and rewordings by mtk |
7 | .\" | |
4c1c5274 | 8 | .TH create_module 2 (date) "Linux man-pages (unreleased)" |
c4d4162c MK |
9 | .SH NAME |
10 | create_module \- create a loadable module entry | |
11 | .SH SYNOPSIS | |
12 | .nf | |
13 | .B #include <linux/module.h> | |
68e4db0a | 14 | .PP |
c7e4ef09 | 15 | .BI "[[deprecated]] caddr_t create_module(const char *" name ", size_t " size ); |
c4d4162c MK |
16 | .fi |
17 | .SH DESCRIPTION | |
4a9c7a5e | 18 | .IR Note : |
77a08895 | 19 | This system call is present only in kernels before Linux 2.6. |
efeece04 | 20 | .PP |
c4d4162c MK |
21 | .BR create_module () |
22 | attempts to create a loadable module entry and reserve the kernel memory | |
23 | that will be needed to hold the module. | |
24 | This system call requires privilege. | |
47297adb | 25 | .SH RETURN VALUE |
c4d4162c | 26 | On success, returns the kernel address at which the module will reside. |
dec985f9 | 27 | On error, \-1 is returned and |
c4d4162c | 28 | .I errno |
f6a4078b | 29 | is set to indicate the error. |
c4d4162c MK |
30 | .SH ERRORS |
31 | .TP | |
32 | .B EEXIST | |
33 | A module by that name already exists. | |
34 | .TP | |
35 | .B EFAULT | |
36 | .I name | |
37 | is outside the program's accessible address space. | |
38 | .TP | |
39 | .B EINVAL | |
40 | The requested size is too small even for the module header information. | |
41 | .TP | |
42 | .B ENOMEM | |
43 | The kernel could not allocate a contiguous block of memory large | |
44 | enough for the module. | |
45 | .TP | |
eab64696 MK |
46 | .B ENOSYS |
47 | .BR create_module () | |
27ad8f18 MK |
48 | is not supported in this version of the kernel |
49 | (e.g., the kernel is version 2.6 or later). | |
eab64696 | 50 | .TP |
c4d4162c MK |
51 | .B EPERM |
52 | The caller was not privileged | |
53 | (did not have the | |
54 | .B CAP_SYS_MODULE | |
55 | capability). | |
ff457ccb | 56 | .SH VERSIONS |
33a0ccb2 | 57 | This system call is present on Linux only up until kernel 2.4; |
c4d4162c | 58 | it was removed in Linux 2.6. |
ceaeac24 | 59 | .\" Removed in Linux 2.5.48 |
3113c7f3 | 60 | .SH STANDARDS |
a1d5f77c | 61 | .BR create_module () |
8382f16d | 62 | is Linux-specific. |
4a9c7a5e | 63 | .SH NOTES |
c37cf7d3 MK |
64 | This obsolete system call is not supported by glibc. |
65 | No declaration is provided in glibc headers, but, through a quirk of history, | |
66 | glibc versions before 2.23 did export an ABI for this system call. | |
4a9c7a5e | 67 | Therefore, in order to employ this system call, |
c37cf7d3 MK |
68 | it was sufficient to manually declare the interface in your code; |
69 | alternatively, you could invoke the system call using | |
4a9c7a5e | 70 | .BR syscall (2). |
47297adb | 71 | .SH SEE ALSO |
c4d4162c | 72 | .BR delete_module (2), |
f0c34053 | 73 | .BR init_module (2), |
c4d4162c | 74 | .BR query_module (2) |