函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\nommu.c Create Date:2022-07-27 16:03:59
Last Modify:2020-03-17 21:26:27 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:split a vma into two pieces at address 'addr', a new vma is allocated either* for the first part or the tail.

函数原型:int split_vma(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, int new_below)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
struct vm_area_struct *vma
unsigned longaddr
intnew_below
1393  如果File we map to (can be NULL). 则返回:负ENOMEM
1396  如果 number of VMAs 大于等于sysctl_max_map_count则返回:负ENOMEM
1399  region等于分配高速缓存区
1400  如果非region则返回:负ENOMEM
1403  new等于vm_area_dup(vma)
1404  如果非new
1405  kmem_cache_free(list of mapped, potentially shareable regions , region)
1406  返回:负ENOMEM
1410  region等于vm_region
1411  vm_region等于region
1413  npages等于addrOur start address within vm_mm. 右移PAGE_SHIFT determines the page size
1415  如果new_below
1416  gion allocated to here 等于gion initialised to here 等于The first byte after our end addresswithin vm_mm. 等于addr
1417  否则
1418  start address of region 等于Our start address within vm_mm. 等于addr
1419  he offset in vm_file corresponding to vm_start 等于Offset (within vm_file) in PAGE_SIZEunits 加等于npages
1422  如果Function pointers to deal with this struct. openopen(new)
1425  delete a VMA from its owning mm_struct and address space
1426  lock for writing
1427  delete a region from the global tree
1428  如果new_below
1429  vm_start等于Our start address within vm_mm. 等于addr
1430  vm_pgoff等于Offset (within vm_file) in PAGE_SIZEunits 加等于npages
1431  否则
1432  vm_end等于The first byte after our end addresswithin vm_mm. 等于addr
1433  vm_top等于addr
1435  add a region into the global tree
1436  add a region into the global tree
1437  lease a write lock
1438  add a VMA into a process's mm_struct in the appropriate place in the list* and tree and add to the address space's page tree also if not an anonymous* page* - should be called with mm->mmap_sem held writelocked
1439  add a VMA into a process's mm_struct in the appropriate place in the list* and tree and add to the address space's page tree also if not an anonymous* page* - should be called with mm->mmap_sem held writelocked
1440  返回:0
调用者
名称描述
do_munmaplease a mapping* - under NOMMU conditions the chunk to be unmapped must be backed by a single* VMA, though it need not cover the whole VMA
mlock_fixupmlock_fixup - handle mlock[all]/munlock[all] requests.* Filters out "special" vmas -- VM_LOCKED never gets set for these, and* munlock is a no-op. However, for some special vmas, we go ahead and* populate the ptes.
userfaultfd_register