我正在执行页表遍历。当我准备更新内核时出现错误:
\n\nkernel/sys.c: In function \xe2\x80\x98__do_sys_get_page_info\xe2\x80\x99:\nkernel/sys.c:2745:23: error: passing argument 1 of \xe2\x80\x98pud_offset\xe2\x80\x99 from incompatible pointer type [-Werror=incompatible-pointer-types]\n pud = pud_offset(pgd, vmpage);\n ^\nIn file included from ./include/linux/mm.h:99:0,\n from kernel/sys.c:19:\n./arch/x86/include/asm/pgtable.h:905:22: note: expected \xe2\x80\x98p4d_t * {aka struct <anonymous> *}\xe2\x80\x99 but argument is of type \xe2\x80\x98pgd_t * {aka struct <anonymous> *}\xe2\x80\x99\n static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)\n ^\nRun Code Online (Sandbox Code Playgroud)\n\n这是使用代码的地方:
\n\n....\nint loc, ref, dirty;\nstruct vm_area_struct *vma;\nunsigned long vmpage;\nstruct mm_struct *task_mm = task->mm;\nif ((task_mm && task_mm->mmap))\n{\n int i;\n pgd_t *pgd;\n pud_t *pud;\n …Run Code Online (Sandbox Code Playgroud)