Access user address from the kernel
Can someone kindly let me know if it is possible to access the user process' address space from a kernel thread.
I tried changing the mm pointer from NULL to a user space mm but it OOPSed giving page fault error.(Or is there anything else i need to apart from resetting the mm pointer and active_mm pointer to user thread's mm and active_mm?)
I also tried to tried to reset the cr3 register of the processor executing the kernel thread to the user thread's cr3(My machine has 2 processors) but it didnt help either.
I am stuck with this for a loong time now.Kindly let me know if this is possible.
Thanks a lot,
trouble over copy_to_user
I used copy_to_user in kernel 22.214.171.124.2798-fc6. I made update to 126.96.36.199 and reboot, my program start to fail on this particular call. Anyone has idea?
Invalid module format response from modprobe
Thanks Dilbert for your response!
I made mistake. It may not be copy_to_user problem. I think I copied my driver into wrong place (for older version of kernel) that caused the ioctl function not work which used copy_to_user in the ioctl. However, I am having trouble to insmod or modprobe my driver. I got "Invalid module format" after my mobprobe.
Anyone has idea?