函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\gup.c Create Date:2022-07-27 16:01:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:populate_vma_page_range() - populate a range of pages in the vma

函数原型:long populate_vma_page_range(struct vm_area_struct *vma, unsigned long start, unsigned long end, int *nonblocking)

返回类型:long

参数:

类型参数名称
struct vm_area_struct *vma>vm_mm->mmap_sem must be held.
unsigned longstart
unsigned longend
int *nonblocking
1203  mm等于The address space we belong to.
1204  nr_pages等于endstart的差除PAGE_SIZE
1207  VM_BUG_ON(start & ~PAGE_MASK)
1208  VM_BUG_ON(end & ~PAGE_MASK)
1209  VM_BUG_ON_VMA(start < Our start address within vm_mm. , >vm_mm->mmap_sem must be held.)
1210  VM_BUG_ON_VMA(end > The first byte after our end addresswithin vm_mm. , >vm_mm->mmap_sem must be held.)
1211  VM_BUG_ON_MM(!In all implementations count != 0 means locked , mm)
1213  gup_flags等于mark page accessed 按位或ault in page 按位或lock present pages
1214  如果Flags, see mm.h. 按位与Lock the pages covered when they are faulted in gup_flags与等于ault in page 的反
1221  如果Flags, see mm.h. 按位与VM_WRITE按位或VM_SHARED的值的值恒等于VM_WRITEgup_flags或等于check pte is writable
1228  如果Flags, see mm.h. 按位与currently active flags 按位或VM_WRITE按位或VM_EXEC的值则gup_flags或等于get_user_pages read/write w/o permission
1235  返回:__get_user_pages() - pin user pages in memory*@tsk: task_struct of target task*@mm: mm_struct of target mm*@start: starting user address*@nr_pages: number of pages from start to pin*@gup_flags: flags modifying pin behaviour
调用者
名称描述
__mm_populate__mm_populate - populate and/or mlock pages within a range of address space.* This is used to implement mlock() and the MAP_POPULATE / MAP_LOCKED mmap* flags. VMAs must be already marked with the desired vm_flags, and* mmap_sem must not be held.
find_extend_vma
mprotect_fixup