| 函数逻辑报告 | 
| Source Code: fs\binfmt_misc.c | Create Date:2022-07-29 11:02:06 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:he loader itself
函数原型:static int load_misc_binary(struct linux_binprm *bprm)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct linux_binprm * | bprm | 
| 135 | struct file * interp_file = NULL | 
| 137 | fd_binary等于负1 | 
| 144 | read_lock( & entries_lock) | 
| 145 | fmt等于Check if we support the binfmt* if we do, return the node, else NULL* locking is done in load_misc_binary | 
| 148 | read_unlock( & entries_lock) | 
| 154 | 如果interp_flags按位与BINPRM_FLAGS_PATH_INACCESSIBLE则转到:ret | 
| 157 | 如果非 type, status, etc. 按位与MISC_FMT_PRESERVE_ARGV0的值则 | 
| 163 | 如果 type, status, etc. 按位与MISC_FMT_OPEN_BINARY则 | 
| 169 | fd_binary等于get_unused_fd_flags(0) | 
| 170 | 如果fd_binary小于0则 | 
| 174 | fd_install(fd_binary, file) | 
| 178 | would_dump(bprm, file) | 
| 180 | allow_write_access(file) | 
| 181 | file = NULL | 
| 185 | interp_data等于fd_binary | 
| 187 | 否则 | 
| 196 | argc自加 | 
| 202 | argc自加 | 
| 209 | 如果 type, status, etc. 按位与MISC_FMT_OPEN_FILE则 | 
| 211 | 如果非是错误则deny_write_access(interp_file) | 
| 213 | 否则 | 
| 220 | file等于interp_file | 
| 221 | 如果 type, status, etc. 按位与MISC_FMT_CREDENTIALS则 | 
| 222 | pos等于0 | 
| 228 | memset(buf, 0, sizeof(linux_binprm->buf) ) | 
| 229 | retval等于kernel_read(file, buf, sizeof(linux_binprm->buf) , & pos) | 
| 231 | 否则retval等于Fill the binprm structure from the inode.* Check permissions, then read the first BINPRM_BUF_SIZE bytes* This may be called multiple times for binary chains (scripts for example). | 
| 241 | ret : | 
| 243 | 返回:retval | 
| 244 | error : | 
| 245 | 如果fd_binary大于0则In contrast to sys_close(), this stub does not check whether the syscall* should or should not be restarted, but returns the raw error codes from* __close_fd(). | 
| 247 | interp_flags等于0 | 
| 248 | interp_data等于0 | 
| 249 | 转到:ret | 
| 源代码转换工具 开放的插件接口 | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |