kernel device drivers: copy_to/from_user
First, the obvious question: Why would you want to do that? The answer is, I wrote the node read/write functions first and I'm lazy and just want to wrapper that for the ioctl() implementation.
Now my question: Can I use copy_to/from_user on kernel memory? Looking at the code for it (which is mostly assembly) it looks like it should work without any problems, but I just want to be sure that I can actually do that. If not, I'll rewrite my read/write commands to be wrappers for the internal read and write of the device.
Thanks in advance for any help -- and BTW, this ain't no stinkin' homework ;).
[EDIT]
What if I allocate memory with GFP_USER, then send that buffer along the line to the "real" buffer? Would that suffice the copy_to/from_user()?