CREATE_MODULE(2) Linux Programmer's Manual CREATE_MODULE(2)NAME
create_module - create a loadable module entry
SYNOPSIS
#include <linux/module.h>
caddr_t create_module(const char *name, size_t size);
DESCRIPTION
create_module() attempts to create a loadable module entry and reserve the kernel memory that will be needed to hold the module. This sys-
tem call requires privilege.
RETURN VALUE
On success, returns the kernel address at which the module will reside. On error -1 is returned and errno is set appropriately.
ERRORS
EEXIST A module by that name already exists.
EFAULT name is outside the program's accessible address space.
EINVAL The requested size is too small even for the module header information.
ENOMEM The kernel could not allocate a contiguous block of memory large enough for the module.
ENOSYS create_module() is not supported in this version of the kernel.
EPERM The caller was not privileged (did not have the CAP_SYS_MODULE capability).
VERSIONS
This system call is only present on Linux up until kernel 2.4; it was removed in Linux 2.6.
CONFORMING TO
create_module() is Linux-specific.
SEE ALSO delete_module(2), init_module(2), query_module(2)COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2007-06-03 CREATE_MODULE(2)
Check Out this Related Man Page
CREATE_MODULE(2) Linux Programmer's Manual CREATE_MODULE(2)NAME
create_module - create a loadable module entry
SYNOPSIS
#include <linux/module.h>
caddr_t create_module(const char *name, size_t size);
DESCRIPTION
Note: This system call is present only in kernels before Linux 2.6.
create_module() attempts to create a loadable module entry and reserve the kernel memory that will be needed to hold the module. This sys-
tem call requires privilege.
RETURN VALUE
On success, returns the kernel address at which the module will reside. On error -1 is returned and errno is set appropriately.
ERRORS
EEXIST A module by that name already exists.
EFAULT name is outside the program's accessible address space.
EINVAL The requested size is too small even for the module header information.
ENOMEM The kernel could not allocate a contiguous block of memory large enough for the module.
ENOSYS create_module() is not supported in this version of the kernel (e.g., the kernel is version 2.6 or later).
EPERM The caller was not privileged (did not have the CAP_SYS_MODULE capability).
VERSIONS
This system call is present on Linux only up until kernel 2.4; it was removed in Linux 2.6.
CONFORMING TO
create_module() is Linux-specific.
SEE ALSO delete_module(2), init_module(2), query_module(2)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2012-10-18 CREATE_MODULE(2)
1) How to enable Hibernate in Linux ?
2) Does compiling kernel from source code
alters the current setup of the kernel after implementation
Thx in advance,
siva. (3 Replies)
Hi All,
Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff.
Cheers,
Brendan (4 Replies)
Hi,
Does anyone know if it is possible to know the current value of a kernel module parameters after the module is loaded. Are the values of the parameters advertised at some /proc or /sys location ?
The only thing I know is modinfo, that actually looks a the module .ko and gives a... (3 Replies)
Hi,
I'm currently working on a project to help the analysis of malware from inside the kernel to avoid any kind of detection.
So I need to be able to read the process memory from my kernel module.
As of now, I'm stuck at converting a virtual memory address (for example 0x080483e8 found... (3 Replies)
Hi masters,
I am new to kernel programming and learning its trade. I am writing a module for lan bandwidth manager. I designed one module successfully for 2.4 kernel . But when I tried to upgrade it for 2.6 kernel I found that struct tq_struct is missing . Is there any suitable... (2 Replies)
Hi All,
I need to develop a kernel module which changes the IP address of a package according to its mac address. It would be a sort of L2 Nat.
Somebody know if I can do this using netfilter??
Thanks. (2 Replies)
I have been using Linux OS since 4 years and I'm very interested to know how to create a Linux Distro. I have heard about LFS.
I would just like to know, what do I need to create a Linux Distro?
I'm not a programmer, if I have to create a Linux Distro, what programming languages do I need to... (3 Replies)
Hi there,
I'm currently writing a program/module which makes use of the Linux Security Modules (LSM), which provide hooks for some security .
The bad thing about it is: The function to set the hook to the LSM is not exported. That means, I can't just write a loadable kernel module, but have to... (3 Replies)
I have open suse kernel kernel 3.1.0-1.2-desktop on which I used kernel source 3.1.10-1.2 downloaded from kernel.org.
The module gets built.
While loading a kernel module I am getting Invalid module format error with description "first_driver: no symbol version for module_layout"
The... (5 Replies)
I am aware of debugging linux applications using gdb and ddd.
Now I have written a simple kernel module having init_module, exit _module and some functions for tasklets and workqueues.
I want to debug these kernel modules like I used to debug applications setting breakpoints etc.
How can I debug... (1 Reply)
I am not a newbie to Linux, i have been using Linux as my desktop for 4 years, but i am just an end user to Linux, no advanced knowledge to it.
I knew that, i can download generic linux kernel and compile it by myself, but how about Unix? how can i get an Unix kernel and compile it ? or no this... (5 Replies)
Hello, there.
I'm a new beginner to Linux kernel and curious about its memory management.
When multiple applications apply for memory space at the same time, how Linux kernel solve the resource contending problem for high performance?
I have known that there is a buddy system for allocating and... (4 Replies)