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:get_arg_page

Proto:static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write)

Type:struct page

Parameter:

TypeParameterName
struct linux_binprm *bprm
unsigned longpos
intwrite
199  gup_flags = get_user_pages read/write w/o permission
209  If write Then gup_flags |= check pte is writable
216  ret = get_user_pages_remote() - pin user pages in memory*@tsk: the task_struct to use for page fault accounting, or* NULL if faults are not to be recorded
218  If ret <= 0 Then Return NULL
221  If write Then 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).
224  Return page
Caller
NameDescribe
copy_strings'copy_strings()' copies argument/environment strings from the old* processes's memory to the new process's stack. The call to get_user_pages()* ensures the destination page is created and not swapped out.
remove_arg_zeroArguments are '\0' separated strings found at the location bprm->p* points to; chop off the first by relocating brpm->p to right after* the first '\0' encountered.