> > The kernel uses 4 MB pages to map its memory, which on x86 > means that the page directory entries map the page directly, > without the need for a page table. > > Rik So, why is pgd_offset_k(adr) needed? Is there a way to know what's the start and end of kernel code addresses? I'm trying to build a module that searches for a pattern in kernel code. My first ideia was to make a scan of all kernel virtual addresses (from 0xc000000 to 0xffffffff) and test the correspondent pte_t flags to identify the page type and see if they belong to kernel code. I would greatly apreciate some references or guidelines to this problem. Regards, Pedro -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/