]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/create_module.2
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man2 / create_module.2
CommitLineData
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
10create_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 19This system call is present only in kernels before Linux 2.6.
efeece04 20.PP
c4d4162c
MK
21.BR create_module ()
22attempts to create a loadable module entry and reserve the kernel memory
23that will be needed to hold the module.
24This system call requires privilege.
47297adb 25.SH RETURN VALUE
c4d4162c 26On success, returns the kernel address at which the module will reside.
dec985f9 27On error, \-1 is returned and
c4d4162c 28.I errno
f6a4078b 29is set to indicate the error.
c4d4162c
MK
30.SH ERRORS
31.TP
32.B EEXIST
33A module by that name already exists.
34.TP
35.B EFAULT
36.I name
37is outside the program's accessible address space.
38.TP
39.B EINVAL
40The requested size is too small even for the module header information.
41.TP
42.B ENOMEM
43The kernel could not allocate a contiguous block of memory large
44enough for the module.
45.TP
eab64696
MK
46.B ENOSYS
47.BR create_module ()
27ad8f18
MK
48is 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
52The caller was not privileged
53(did not have the
54.B CAP_SYS_MODULE
55capability).
ff457ccb 56.SH VERSIONS
33a0ccb2 57This system call is present on Linux only up until kernel 2.4;
c4d4162c 58it was removed in Linux 2.6.
ceaeac24 59.\" Removed in Linux 2.5.48
3113c7f3 60.SH STANDARDS
a1d5f77c 61.BR create_module ()
8382f16d 62is Linux-specific.
4a9c7a5e 63.SH NOTES
c37cf7d3
MK
64This obsolete system call is not supported by glibc.
65No declaration is provided in glibc headers, but, through a quirk of history,
66glibc versions before 2.23 did export an ABI for this system call.
4a9c7a5e 67Therefore, in order to employ this system call,
c37cf7d3
MK
68it was sufficient to manually declare the interface in your code;
69alternatively, 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)