Discussion:
Copy_From_User for functions
(too old to reply)
cs412017
2005-09-26 16:07:52 UTC
Permalink
I am having trouble visualizing the parameters to be passed in to the
Copy_From_User function for copying a function pointer from user space
to kernel space.

To be particular, I am not sure how to convert a unsigned long to a
function pointer, can we just cast it? Also, what should the third
parameter be, that is, the size of the data to be copied?
Kwang Yul Seo
2005-09-26 17:25:12 UTC
Permalink
If you want to convert a user address to kernel address, you can
use the User_To_Kernel function (geekos/userseg.c) instead of
Copy_From_User function and you can cast unsigned long to a
function pointer.

Kwang Yul Seo

Loading...