2012-09-12 26 views

回答

4

你在linux/mm.h尋找find_vma一些函數的地址。

/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ 
extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr); 

這應該做的伎倆:

struct vm_area_struct *vma = find_vma(task->mm, 0x13000); 
if (vma == NULL) 
    return -EFAULT; 
if (0x13000 >= vma->vm_end) 
    return -EFAULT; 
+0

謝謝Jleahy! – Dhyan

+0

@Dhyan您的編輯是正確的,函數定義在v2.0.19中更改。有人拒絕了它,但我自己糾正了它。 – jleahy

相關問題