Debian Codegraph @

upstream/debian-unstable/man2/create_module.2

raw
1 .\" Copyright 1996, Free Software Foundation, Inc.
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: GPL-1.0-or-later
5 .\"
6 .TH create_module 2 2025-05-17 "Linux man-pages 6.18"
7 .SH NAME
8 create_module \- create a loadable module entry
9 .SH SYNOPSIS
10 .nf
11 .B #include <linux/module.h>
12 .P
13 .BI "[[deprecated]] caddr_t create_module(const char *" name ", size_t " size );
14 .fi
15 .SH DESCRIPTION
16 .IR Note :
17 This system call is present only before Linux 2.6.
18 .P
19 .BR create_module ()
20 attempts to create a loadable module entry and reserve the kernel memory
21 that will be needed to hold the module.
22 This system call requires privilege.
23 .SH RETURN VALUE
24 On success, returns the kernel address at which the module will reside.
25 On error, \-1 is returned and
26 .I errno
27 is set to indicate the error.
28 .SH ERRORS
29 .TP
30 .B EEXIST
31 A module by that name already exists.
32 .TP
33 .B EFAULT
34 .I name
35 is outside the program's accessible address space.
36 .TP
37 .B EINVAL
38 The requested size is too small even for the module header information.
39 .TP
40 .B ENOMEM
41 The kernel could not allocate a contiguous block of memory large
42 enough for the module.
43 .TP
44 .B ENOSYS
45 .BR create_module ()
46 is not supported in this version of the kernel
47 (e.g., Linux 2.6 or later).
48 .TP
49 .B EPERM
50 The caller was not privileged
51 (did not have the
52 .B CAP_SYS_MODULE
53 capability).
54 .SH STANDARDS
55 Linux.
56 .SH HISTORY
57 Removed in Linux 2.6.
58 .\" Removed in Linux 2.5.48
59 .P
60 This obsolete system call is not supported by glibc.
61 No declaration is provided in glibc headers, but, through a quirk of history,
62 glibc versions before glibc 2.23 did export an ABI for this system call.
63 Therefore, in order to employ this system call,
64 it was sufficient to manually declare the interface in your code;
65 alternatively, you could invoke the system call using
66 .BR syscall (2).
67 .SH SEE ALSO
68 .BR delete_module (2),
69 .BR init_module (2),
70 .BR query_module (2)