LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Do we have any chance of calling user space callback function from kernel space? (http://www.linuxquestions.org/questions/linux-newbie-8/do-we-have-any-chance-of-calling-user-space-callback-function-from-kernel-space-756938/)

ravishankar.g 09-22-2009 03:43 AM

Do we have any chance of calling user space callback function from kernel space?
 
I am writing device driver in which i have to call callback function from kernel space, which are saving my data. But the callback functions are in userspace. While accessing them i am getting segmentation fault.

Plz help me to complete this action.

lutusp 09-22-2009 08:14 PM

Quote:

Originally Posted by ravishankar.g (Post 3692548)
I am writing device driver in which i have to call callback function from kernel space, which are saving my data. But the callback functions are in userspace. While accessing them i am getting segmentation fault.

Plz help me to complete this action.

Sure, OK. Here's the solution: "Don't call user space from your kernel driver."

Don't you understand what this would mean? It would allow a user to compromise the security of the kernel. Linux would become Windows. (shudder)

The obvious solution is not to write this as a kernel driver.


All times are GMT -5. The time now is 07:44 AM.