On 1/20/07, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
On Fri, 2007-01-19 at 15:13 -0800, Karthik.G. wrote: > Hi, > I have a small question reg kmap() > Suppose i map a user process page into kernel mem using kmap() > and after the mapping the user modifies the contents ,would it be read > by the kernel. > Or everytime the user changes something in his address space,the > kernel has to unmap and then do a kmap again?` this depends on the architecture; on x86 you'll see it (by luck), on others... hardly. I assume you've made very sure the user can't just munmap the page while you have it kmap()'d ... what would mean you'd be looking at someone elses memory :)
Uh, I'm sorry ... but I couldn't understand the scenario well. Karthik was not talking about user application using mmap(), was he? I think he was talking about a normal user space address (e.g. user space stack) being kmapped into kernel, right? Thanks, Rick -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/