--- Guillaume Thouvenin <guillaume.thouvenin@polymtl.ca> wrote: > I'd like to have a confirmation (or not) > > The function (macro) virt_to_page() only works for kernel > virtual adress because > there is a translation between kernel space and physical > adress right? > For virtual adress in user space, Linux uses the three > levels of the page tables > (I mean pgd gives a pointer to pmd which gives a pointer > to pte and the offset > gives a physical adress). Am I right with this view? virt_to_page() works only for kernel virtual addresses, but not for all of kernel space. It works for the range of virtual addresses that have a one-to-one mapping to physical pages (in Linux MM terms, the DMA and Normal memory zones). Pages in Highmem zone may also be mapped into kernel space. virt_to_page does not get the correct result for such addresses. Hope this helps, Ravi. __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/