Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:reate_aout_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", returning the new stack pointer value.

Proto:static unsigned long __user *create_aout_tables(char __user *p, struct linux_binprm *bprm)

Type:unsigned long

Parameter:

TypeParameterName
char __user *p
struct linux_binprm *bprm
61  __user * __user * argv
62  __user * __user * envp
63  __user * sp
64  argc = argc
65  envc = envc
67  sp * __user = - size of * & p
81  sp -= envc + 1
82  envp = sp
83  sp -= argc + 1
84  argv = sp
86  Write a simple value into user space((unsignedlong)envp, --sp)
87  Write a simple value into user space((unsignedlong)argv, --sp)
89  Write a simple value into user space(argc, --sp)
90  arg_start = p
91  When argc-- > 0 cycle
93  Write a simple value into user space(p, argv++)
94  Do
96  When c cycle
98  Write a simple value into user space(NULL, argv)
99  arg_end = env_start = p
100  When envc-- > 0 cycle
102  Write a simple value into user space(p, envp++)
103  Do
105  When c cycle
107  Write a simple value into user space(NULL, envp)
108  env_end = p
109  Return sp
Caller
NameDescribe
load_aout_binaryThese are the functions used to load a.out style executables and shared* libraries. There is no binary dependent code anywhere else.