函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:These are the functions used to load flat style executables and shared* libraries. There is no binary dependent code anywhere else.

函数原型:static int load_flat_binary(struct linux_binprm *bprm)

返回类型:int

参数:

类型参数名称
struct linux_binprm *bprm
925  regs等于current_pt_regs()
926  stack_len等于0
931  memset( & libinfo, 0, libinfo的长度)
943  stack_len加等于argc加1的和乘*的长度
944  stack_len加等于envc加1的和乘*的长度
945  stack_len等于@a is a power of 2 value (stack_len, User data (stack) also needs to be aligned.* Here we can be a bit looser than the data sections since this* needs to only meet arch ABI requirements.)
947  res等于load_flat_file(bprm, & libinfo, 0, & stack_len)
948  如果res小于0则返回:res
952 i小于MAX_SHARED_LIBS循环
953  如果非 Has this library been loaded? 则继续下一循环
955 j小于MAX_SHARED_LIBS循环
960  p减等于j加1
966  stall the new credentials for this executable
968  set_binfmt( & flat_format)
971  res等于Finalizes the stack vm_area_struct. The flags and permissions are updated,* the stack is optionally relocated, and some extra space is added.
972  如果非resres等于reate_flat_tables() parses the env- and arg-strings in new user* memory and creates the pointer tables from them, and puts their* addresses on the "stack", recording the new stack pointer value.
985  如果res则返回:res
992  start_addr等于 Start address for this module
1008  FLAT_PLAT_INIT(regs)
1011  Runs immediately before start_thread() takes over.
1012  pr_debug("start_thread(regs=0x%p, entry=0x%lx, start_stack=0x%lx)\n", regs, start_addr, start_stack)
1014  start_thread(regs, start_addr, start_stack)
1016  返回:0