Messages in this thread | | | Date | Tue, 2 Jun 1998 11:13:16 -0700 | From | "David S. Miller" <> | Subject | Re: Demo of patching syscalls from a module |
| |
This won't work at all on some architectures, assuming the format and layout of the syscall table is a very bad idea and simply won't work.
For example, on the MIPS this table is of the form [ syscall_function, num_args ] so would not work with your technique.
There are other issues, such as on sparc64, where another system call table holds the 32-bit compatability versions of every supported system call. Also nothing says anything about what the name of the system call table should even be.
Finally, the other solution to adding system calls is to have a dummy function of some sort statically linked into the kernel, it has an assosciated function pointer it checks, which is set when the module containing the real system call implementation is loaded (this is what knfsd does). Really system calls should be added with a lot of care, and not just done on a whim, this is why I am sort of happy it's a real pain to add them using loadable modules by just changing entries in the table directly ;-) There are almost always numerous other methods by which you can obtain the same ends, via pseudo devices and ioctl()'s for example.
Later, David S. Miller davem@dm.cobaltmicro.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |