Hi all,
I would like to implement a hook procedure of sys_open/sys_close in kernel
module.
(it is a thing like WindowsNT FilterDriver.)
I copied the address of my function(hook_syscall_open) to sys_call_table[5].
asmlinkage int hook_syscall_open (const char * filename, int flags, int
mode)
{
long (*sys_open)(const char *,int,int) = real_sys_open;
printk("original sys_open addr %x\n", sys_open );
return ( sys_open(filename,flags,mode) );
}
It calls original sys_open. But, Oops occurs.
Is the hook of sys_xxx possible?
If it is possible, Do you know a document or a sample?
Thanks,
Kozy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:12 EST