Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:The nascent bprm->mm is not visible until exec_mmap() but it can* use a lot of memory, account these pages in current->mm temporary* for oom_badness()->get_mm_rss(). Once exec succeeds or fails, we* change the counter back via acct_arg_size(0).

Proto:static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages)

Type:void

Parameter:

TypeParameterName
struct linux_binprm *bprm
unsigned longpages
184  mm = mm
185  diff = pages - vma_pages
187  If Not mm || Not diff Then Return
190  vma_pages = pages
191  add_mm_counter(mm, MM_ANONPAGES, diff)
Caller
NameDescribe
get_arg_page
flush_old_execCalling this is the point of no return. None of the failures will be* seen by userspace since either the process is already taking a fatal* signal (via de_thread() or coredump), or will have SEGV raised
__do_execve_filesys_execve() executes a new program.