I'm using a kernel module to hook system calls like sys_read()
, sys_write()
and so on. The way I'm hooking it is pretty much like this post.
Now I want to hook sys_clone()
in the same way. What I can find from the source code is as follows.
long sys_clone(unsigned long, unsigned long, int __user *, int, int __user*)
First I have no idea of what those parameters mean. I tried to printk them to see. However, even when I tested with a program invoking plenty of clone()
system call, I didn't see any printings from my_sys_clone()
. Is that because the clone()
didn't request for sys_clone()
I hooked at all? Or are there any special cases for hooking a sys_clone()
?