Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vma is the first one with address < vma->vm_start. Have to extend vma.

Proto:int expand_downwards(struct vm_area_struct *vma, unsigned long address)

Type:int

Parameter:

TypeParameterName
struct vm_area_struct *vma
unsigned longaddress
2411  mm = The address space we belong to.
2413  error = 0
2415  address &= PAGE_MASK
2416  If address < mmap_min_addr Then Return -EPERM
2420  prev = linked list of VM areas per task, sorted by address
2422  If prev && Not (Flags, see mm.h. & general info on the segment ) && Flags, see mm.h. & ( VM_WRITE | currently active flags | VM_EXEC) Then
2424  If address - The first byte after our end addresswithin vm_mm. < stack_guard_gap Then Return -ENOMEM
2429  If Value for the false possibility is greater at compile time(anon_vma_prepare(vma)) Then Return -ENOMEM
2437  anon_vma_lock_write(Serialized by page_table_lock )
2440  If address < Our start address within vm_mm. Then
2443  size = The first byte after our end addresswithin vm_mm. - address
2444  grow = Our start address within vm_mm. - address >> PAGE_SHIFT determines the page size
2446  error = -ENOMEM
2449  If Not error Then
2476  anon_vma_unlock_write(Serialized by page_table_lock )
2477  khugepaged_enter_vma_merge(vma, Flags, see mm.h. )
2478  validate_mm(mm)
2479  Return error
Caller
NameDescribe
expand_stack