On 11/10/05, Thomas Petazzoni <thomas.petazzoni@xxxxxxxx> wrote: > To convert a logical address to a "struct page *" (which represents a > physical page), you can use virt_to_page(), but it only works for kernel > addresses (so it won't work with start_code and end_code that are user > addresses). > > I don't know what is the clean way of converting a user virtual address > to the associated physical address. > I think user virtual addresses are not always related/mapped to the same physical address, let say when the swapping is done and the physical address which was in use by user space is now allocated to fulfil kernel or some other mermoy requirement and then user space again going to access the same virtual address then page-fault will occur and after this that user virtual address most likely be pointing to some other physical memory location as previous physical memory location is already allocated to some-one else ... Is my thinking is correct ? And if yes then can some-one tell me where I can find the code related to that ? (I am just asking this for interest and its not so important to me, so not going to spend time for finding the source/result for this as I already have lot of work to do ! ;) ) Thanks, -- Fawad Lateef -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/