函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:During bprm_mm_init(), we create a temporary stack at STACK_TOP_MAX. Once* the binfmt code determines where the new stack should reside, we shift it to* its final location. The process proceeds as follows:* 1) Use shift to calculate the new vma endpoints.

函数原型:static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)

返回类型:int

参数:

类型参数名称
struct vm_area_struct *vma
unsigned longshift
627  mm等于The address space we belong to.
628  old_start等于Our start address within vm_mm.
629  old_end等于The first byte after our end addresswithin vm_mm.
630  length等于old_endold_start
631  new_start等于old_startshift
632  new_end等于old_endshift
635  BUG_ON(new_start > new_end)
641  如果vma不等于look up the first VMA in which addr resides, NULL if none* - should be called with mm->mmap_sem at least held readlocked则返回:负EFAULT
647  如果vma_adjust(vma, new_start, old_end, Offset (within vm_file) in PAGE_SIZEunits , NULL)则返回:负ENOMEM
654  如果length不等于move_page_tables(vma, old_start, vma, new_start, length, false)则返回:负ENOMEM
658  lru_add_drain()
659  lb_gather_mmu - initialize an mmu_gather structure for page-table tear-down*@tlb: the mmu_gather structure to initialize*@mm: the mm_struct of the target address space*@start: start of the region that will be removed from the page-table*@end: end of the
660  如果new_end大于old_start
664  This function frees user-level page tables of a process.
666  否则
673  This function frees user-level page tables of a process.
676  lb_finish_mmu - finish an mmu_gather structure*@tlb: the mmu_gather structure to finish*@start: start of the region that will be removed from the page-table*@end: end of the region that will be removed from the page-table* Called at the end of the
681  vma_adjust(vma, new_start, new_end, Offset (within vm_file) in PAGE_SIZEunits , NULL)
683  返回:0
调用者
名称描述
setup_arg_pagesFinalizes the stack vm_area_struct. The flags and permissions are updated,* the stack is optionally relocated, and some extra space is added.