Solved

Loading a Kernel Module in Linux

Posted on 2006-07-19
5
294 Views
Last Modified: 2010-04-20
HI expert
I am new to kernel module Loading under linux , i compiled the sample program

but  i could not load the module using insmod  , modprobe
i am using Mandriva 10.0      kernel version   uname -r    2.6.12-12mdk-i686-up-4GB

insmod: error inserting 'hello-2.o': -1 Invalid module format

FATAL: Module hello-2.o not found  

are the 2 errors that i got ,

please let me what is the correct way to load a kernel module
0
Comment
Question by:mmadhuso
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 125 total points
ID: 17139164
insmod /path/to/kernel/module/hello-2.o

I presume that you are working through this "howto?":

http://www.tldp.org/LDP/lkmpg/2.6/html/index.html

(   (()
(`-' _\
 ''  ''
0
 

Author Comment

by:mmadhuso
ID: 17139856
thanks , its working now


One more stuff   have u used

according to http://puggy.symonds.net/~abhi/files/mm/node122.html

De-Allocating a Memory Region

 Function sys_munmap()
 Function do_munmap()

To modify heap

 Function sys_brk()  
 Function do_brk()

thanks for the help
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17140631
I'm afraid that I've done very little work with kernel modules, other than the odd patch of other people's work. The only advice that I can offer, is make sure that allocations in the init are deallocated in the exit, otherwise, your kernel will have stability problems!

(   (()
(`-' _\
 ''  ''

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now