Is it possible to add a system call via a LKM?

前端 未结 3 1487
感动是毒
感动是毒 2021-01-17 19:33

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

3条回答
  •  鱼传尺愫
    2021-01-17 19:53

    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.

提交回复
热议问题