I would like to access the specific user location from the kernel thread.
Can I temprorily map the specific page in the user process to the kernel thread and read/write its contents?
Im supposed to have a kernel thread running in one of my processors while it accesses the currently executing user process in another processor to do this . :(
Thanks
Karthik
Erik Mouw <mouw@xxxxxxxxxxxx> wrote:
On Thu, Jan 18, 2007 at 06:22:10AM -0800, Karthik.G. wrote:
> Can someone kindly let me know if it is possible to access the user
> process' address space from a kernel thread ?
No.
> 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.
So you already found out that it indeed doesn't work :)
> I am stuck with this for a loong time now.Kindly let me know if this
> is possible. Or is there anyother way to try this?
The usual trick: create a device driver, use procfs (deprecated) or sysfs
file, or use a netlink socket. It all depends on what you want to
achieve. If you could tell a bit more about what you want to achieve,
we can help you what to do.
Erik
--
They're all fools. Don't worry. Darwin may be slow, but he'll
eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers.