overloading system calls.

Tigran Aivazian (tigran@aivazian.demon.co.uk)
Sun, 31 May 1998 17:30:09 +0100 (BST)


Hello guys,

Is there a way to replace a system call dynamically within a module?
Naive approach of putting something like:

asmlinkage int sys_getpid(void)
{
printk(KERN_INFO "my getpid() for <%s>\n", current->comm);
return current->pid;
}

of course, did not work, although it did not generate any errors and
loaded ok, and even /proc/ksyms showed sys_getpid() as exported by this
trivial module.

So, if the above is not the way -- is there a proper way at all?

Thanks,
Tigran.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu