LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-29-2009, 06:55 PM   #1
mrshanim
Member
 
Registered: Aug 2009
Posts: 30

Rep: Reputation: 16
intercepting syscall exit - problems


Hi,
I trying to intercept sys_exit systemcall using kernel modules.
Which tries to take sys_exit ptr to our kernel module function(this is my sys_myexit), do operations(printing some message ), then calls to original sys_exit() to finish its task.

But I got error when compiling module
Quote:
error: sys/syscall.h: No such file or directory
I already #define <sys/syscall.h> in mod.c
the file is available in the location /usr/include/sys/syscall.h

When I write complete path as #include </usr/include/sys/syscall.h>
then it gives error
Quote:
error: bits/syscall.h: No such file or directory
Then I tried with #define <asm/unistd.h> and remove #define <sys/syscall.h>
It compiled successfully with warning as
Quote:
WARNING: "sys_call_table" [/home/manish/temp/mod_sysint.ko] undefined!
I am tring to read sys_call_table[] structure to use sys_exit ptr

When I do $insmod mod_sysint.ko it gives error as
Quote:
insmod: error inserting 'mod_sysint.ko': -1 Unknown symbol in module
I am using 2.6.26.2 debian5.0etch 64bit

Thanks
 
  


Reply

Tags
syscall



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Syscall problems RepSTOSW Linux - Kernel 3 03-21-2010 11:57 AM
Syscall problems RepSTOSW Linux - Newbie 2 05-11-2009 08:00 PM
mount /mnt/cdrom uses 100% CPU and does not exit - possibly stuck in syscall atom Linux - Software 3 07-04-2007 09:46 AM
about the ip packet intercepting wangjinyi Programming 8 09-14-2005 12:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration