Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Verify that the stack growth is acceptable and* update accounting. This is shared with both the

Proto:static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, unsigned long grow)

Type:int

Parameter:

TypeParameterName
struct vm_area_struct *vma
unsigned longsize
unsigned longgrowup and grow-down cases.
2274  mm = The address space we belong to.
2278  If Not Return true if the calling process may expand its vm space by the passed* number of pages Then Return -ENOMEM
2282  If size > rlimit(RLIMIT_STACK) Then Return -ENOMEM
2286  If Flags, see mm.h. & VM_LOCKED Then
2289  locked = Pages that have PG_mlocked set + up and grow-down cases.
2290  limit = rlimit(RLIMIT_MEMLOCK)
2291  limit >>= PAGE_SHIFT determines the page size
2292  If locked > limit && Not Check operation authority Then Return -ENOMEM
2297  new_start = If Flags, see mm.h. & VM_GROWSUP Then Our start address within vm_mm. Else The first byte after our end addresswithin vm_mm. - size
2299  If is_hugepage_only_range(The address space we belong to. , new_start, size) Then Return -EFAULT
2306  If security_vm_enough_memory_mm(mm, up and grow-down cases.) Then Return -ENOMEM
2309  Return 0
Caller
NameDescribe
expand_downwardsvma is the first one with address < vma->vm_start. Have to extend vma.