首页 > 解决方案 > 如何从 mm_strucnt 和缓冲区中找到正确的 vm_area_struct

问题描述

所以在 mm_strucnt 中有 vm_areas 的列表,

struct vm_area_struct *mmap_cache; 

我想找到一个包含我的缓冲区的函数,例如将获取 sturc_mm 并返回包含我的缓冲区的 vm_area

get_vmArea(userbuffer,current->mm)

是否有任何功能可以为我做,所以我不必寻找所有的 vm_area 直到我找到包含 rang 的那个,其中包括我的地址

标签: linuxkernel

解决方案


可以使用这个功能

struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)


推荐阅读