Walking page tables of a process in Linux

前端 未结 2 602
粉色の甜心
粉色の甜心 2020-12-12 18:21

i\'m trying to navigate the page tables for a process in linux. In a kernel module i realized the following function:

static struct page *walk_page_table(uns         


        
2条回答
  •  悲哀的现实
    2020-12-12 19:05

    pte_unmap(ptep); 
    

    is missing just before the label out. Try to change the code in this way:

        ...
        page = pte_page(pte);
        if (page)
            printk(KERN_INFO "page frame struct is @ %p", page);
    
        pte_unmap(ptep); 
    
    out:
    

提交回复
热议问题