Debian Codegraph @

upstream/debian-trixie/man2/create_module.2

raw
1 .\" Copyright (C) 1996 Free Software Foundation, Inc.
2 .\"
3 .\" SPDX-License-Identifier: GPL-1.0-or-later
4 .\"
5 .\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
6 .\" reformatting and rewordings by mtk
7 .\"
8 .TH create_module 2 2024-05-02 "Linux man-pages 6.9.1"
9 .SH NAME
10 create_module \- create a loadable module entry
11 .SH SYNOPSIS
12 .nf
13 .B #include <linux/module.h>
14 .P
15 .BI "[[deprecated]] caddr_t create_module(const char *" name ", size_t " size );
16 .fi
17 .SH DESCRIPTION
18 .IR Note :
19 This system call is present only before Linux 2.6.
20 .P
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.
25 .SH RETURN VALUE
26 On success, returns the kernel address at which the module will reside.
27 On error, \-1 is returned and
28 .I errno
29 is set to indicate the error.
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
46 .B ENOSYS
47 .BR create_module ()
48 is not supported in this version of the kernel
49 (e.g., Linux 2.6 or later).
50 .TP
51 .B EPERM
52 The caller was not privileged
53 (did not have the
54 .B CAP_SYS_MODULE
55 capability).
56 .SH STANDARDS
57 Linux.
58 .SH HISTORY
59 Removed in Linux 2.6.
60 .\" Removed in Linux 2.5.48
61 .P
62 This obsolete system call is not supported by glibc.
63 No declaration is provided in glibc headers, but, through a quirk of history,
64 glibc versions before glibc 2.23 did export an ABI for this system call.
65 Therefore, in order to employ this system call,
66 it was sufficient to manually declare the interface in your code;
67 alternatively, you could invoke the system call using
68 .BR syscall (2).
69 .SH SEE ALSO
70 .BR delete_module (2),
71 .BR init_module (2),
72 .BR query_module (2)