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