Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

create_module(2) [suse 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
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)
Man Page

15 More Discussions You Might Find Interesting

1. Red Hat

Hibernate in Linux

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)
Discussion started by: Sivaswami
3 Replies

2. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

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)
Discussion started by: Brendan Kennedy
4 Replies

3. UNIX for Dummies Questions & Answers

Linux kernel module parameters

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)
Discussion started by: macL
3 Replies

4. Programming

Access process memory from kernel space

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)
Discussion started by: anonymoose
3 Replies

5. Linux

urgent:Where is tq_struct in 2.6

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)
Discussion started by: iamjayanth
2 Replies

6. IP Networking

kernel module

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)
Discussion started by: lagigliaivan
2 Replies

7. What is on Your Mind?

Creating a Linux Distro

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)
Discussion started by: Auzern
3 Replies

8. Linux

Linux kernel 2.6.20?

Dear All Can you please let me know what is the Linux distribution name for kernel 2.6.20? Thank you in advance (4 Replies)
Discussion started by: hadimotamedi
4 Replies

9. Linux

Howto compile my own module into the kernel

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)
Discussion started by: disaster
3 Replies

10. Programming

can a linux kernel module call libc functions?

can a linux kernel module call libc functions, such as printf(), strcpy(), etc...? (9 Replies)
Discussion started by: vistastar
9 Replies

11. UNIX for Dummies Questions & Answers

insmod: Invalid module format error

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)
Discussion started by: rupeshkp728
5 Replies

12. Programming

Debugging Linux Kernel Modules

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)
Discussion started by: rupeshkp728
1 Replies

13. UNIX for Dummies Questions & Answers

can i get UNIX kernel and compile it like Linux ?

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)
Discussion started by: wong.sie.ung
5 Replies

14. UNIX for Beginners Questions & Answers

How to generate a large file in Linux ?

RHEL 7.3 In Linux, how can I create a large dummy file which is 15GB in size ? (4 Replies)
Discussion started by: kraljic
4 Replies

15. UNIX for Advanced & Expert Users

About efficiency of parallel memory allocation

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)
Discussion started by: blackwall
4 Replies