LinuxQuestions.org
Have you listened to LQ Radio?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 10-29-2009, 07:55 PM   #1
mrshanim
LQ Newbie
 
Registered: Aug 2009
Posts: 15
Thanked: 0
intercepting syscall exit - problems


[Log in to get rid of this advertisement]
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
linux mrshanim is offline  
Tag This Post , ,
Reply With Quote

Reply

Bookmarks


Thread Tools

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 2 05-15-2009 01:56 AM
Syscall problems RepSTOSW Linux - Newbie 2 05-11-2009 09:00 PM
mount /mnt/cdrom uses 100% CPU and does not exit - possibly stuck in syscall atom Linux - Software 3 07-04-2007 10:46 AM
about the ip packet intercepting wangjinyi Programming 8 09-14-2005 01:07 AM


All times are GMT -5. The time now is 01:47 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration