I have written following code to understand the Linux page table data structures. It tries to read data at a virtual address asm("movl %%cr3, %0":"=r" (pgd_base)); printk("pgd_base = %#lx\n", pgd_base); pmd_base = *(unsigned long*)__va((pgd_base + ((vaddr & PGDIR_MASK) >> PGDIR_SHIFT))); printk("pmd_base = %#lx\n", pmd_base); pte_base = *(unsigned long*)__va((pmd_base + ((vaddr & PMD_MASK) >> PMD_SHIFT))); printk("pte_base = %#lx\n", pte_base); page_frame_base = *(unsigned long*)__va((pte_base + ((vaddr & PAGE_MASK) >> PAGE_SHIFT))); printk("page_frame_base = %#lx\n", page_frame_base); value = *(unsigned int*)__va((page_frame_base + (vaddr & ~PAGE_MASK))); I get pmd_base as NULL. Can someone explain me why? Also the vaddr is address of an integer in an application. And I have mlock'ed it before passing the virtual address as follows: mlock(&val, sizeof(int)); -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/