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

前端 未结 3 1488
感动是毒
感动是毒 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:58

    Here's an example
    linux system calls

    edit:
    The example above shows howto implement a system call, as far as implementing one from a loadable module; AFAIK, that's not possible, unless you where to overwrite an existing one because the size of the array is a #define.

    Keep in mind there are user space changes required as well, at least if you want to be able to actually use the new system call.

提交回复
热议问题