Kernel hacking ? - Can this be done?

Stanislav Krasilovskiy (prgrssor@cs.bu.edu)
Thu, 29 Jul 1999 13:17:19 -0400 (EDT)


Hi folks,

Thanks for the help with my last problem. The book "Linux Device Drivers"
is in the mail and shall become my bible shortly :)

I have another short question -- is there ANY way to open/read/write
to a file from a kernel routine? Again, excuse my lack of knowledge
on the subject. What I mean to ask is that I will have a
buffer kmalloc'd in the kernel and I will want to read some data into
it from a file from, say, inside a system call routine. Can this be done
at all?

sys_read calls the the filesystem's read function, which uses
copy_to_user (since it assumes it is invoked from user space through
a system call). There may be other problems, as well.

Thank you.

Stan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/