2010.01.11 I can't believe it worked. But it did. You can replace a system call with any darn thing! 2010.01.11 This syscall module replaces three system calls and demonstrates some parameter passing. I'm passing a string in user space to kernel space. I don't know if this works because strings are special and are put on the stack, or if the kernel can access a string in user space. Probably the former case. The next thing to do is to try to pass a buffer into the kernel. Probably won't work. How would the kernel read from user address space. Nutt discuses the way to do this with memcpy and access_ok (verify_area). I'm only passing a stack integer back into user space. This example does not show how to pass a reference parameter to the kernel for the kernel to change and thus pass back. 2010.01.10 insmod ./mod-syscall-hello.o insert the module lsmod see if the modules has loaded tail /var/log/syslog see module load message ./mod-syscall-test-retparm run the syscall test program tail /var/log/syslog see module enter call and leave message rmmod mod-syscall-hello unload module lsmod see if the modules has unloaded tail /var/log/syslog see module unload message. Read all the messages produced by this module. 2010.01.10 Second version is simple call with a printk and a return parameter. The observable results are in /var/log/syslog if the module was actually loaded and in the test file results.