函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\exec.c Create Date:2022-07-29 10:33:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:get_arg_page

函数原型:static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write)

返回类型:struct page

参数:

类型参数名称
struct linux_binprm *bprm
unsigned longpos
intwrite
199  gup_flags等于get_user_pages read/write w/o permission
209  如果writegup_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  如果ret小于等于0则返回:NULL
221  如果writeThe 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  返回:page
调用者
名称描述
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.