call a kernel module function from program at user space

前端 未结 4 1209
别跟我提以往
别跟我提以往 2020-12-08 01:32

I developed a kernel module and some functions on it. Now i need to develop a program in the user space and call some functions which are in the kernel module.

I als

4条回答
  •  清歌不尽
    2020-12-08 01:52

    You seem to be missing the point of kernel and userland separation. If your user program could modify data inside the kernel directly, that would quickly lead to disaster.

    There's only one conventional way for a user program to explicitly request services from the kernel - make a system call.

    There are also traps and some Linux-specific userland-kernel communication mechanisms, but those are not relevant here.

提交回复
热议问题