Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\gup.c Create Date:2022-07-28 14:35:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:populate_vma_page_range() - populate a range of pages in the vma

Proto:long populate_vma_page_range(struct vm_area_struct *vma, unsigned long start, unsigned long end, int *nonblocking)

Type:long

Parameter:

TypeParameterName
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 = (end - start) / 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  If Flags, see mm.h. & Lock the pages covered when they are faulted in Then gup_flags &= ~ault in page
1221  If (Flags, see mm.h. & (VM_WRITE | VM_SHARED)) == VM_WRITE Then gup_flags |= check pte is writable
1228  If Flags, see mm.h. & ( currently active flags | VM_WRITE | VM_EXEC) Then gup_flags |= get_user_pages read/write w/o permission
1235  Return __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
Caller
NameDescribe
__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