I\'d like to add a new system call via an LKM, but I\'m not sure how to do this. That is, I know that if I want to add a completely new system call, I can look through the s
This is an old question, but nevertheless I want to propose my solution. The easiest way to implement a "system-call-like" environment is to rely on a fake device.
In particular, you could create a new device driver which is not actually driving anything. Yet, writing on it, can cause the installed module to perform the required actions.
Additionally, if you want to offer several services, you might map them to ioctl
operations.