函数逻辑报告 | 
Source Code:fs\exec.c | 
Create Date:2022-07-29 10:33:53 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:sys_execve() executes a new program.
函数原型:static int __do_execve_file(int fd, struct filename *filename, struct user_arg_ptr argv, struct user_arg_ptr envp, int flags, struct file *file)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| int | fd | |
| struct filename * | filename | |
| struct user_arg_ptr | argv | |
| struct user_arg_ptr | envp | |
| int | flags | |
| struct file * | file | 
| 1720 | char * pathbuf = NULL | 
| 1734 | 如果flags按位与超出限制且atomic_read( & processes)大于rlimit(RLIMIT_NPROC)则 | 
| 1744 | retval等于Helper to unshare the files of the current task.* We don't want to expose copy_files internals to* the exec layer of the kernel. | 
| 1758 | in_execve等于1 | 
| 1763 | 如果是错误则转到:out_unmark | 
| 1769 | 如果非filename则 | 
| 1770 | filename等于"none" | 
| 1771 | 否则如果fd恒等于Special value used to indicateopenat should use the currentworking directory. 或 pointer to actual string [0]恒等于'/'则 | 
| 1772 | filename等于 pointer to actual string | 
| 1773 | 否则 | 
| 1774 | 如果 pointer to actual string [0]恒等于'\0'则pathbuf等于kasprintf(GFP_KERNEL, "/dev/fd/%d", fd) | 
| 1776 | 否则pathbuf等于kasprintf(GFP_KERNEL, "/dev/fd/%d/%s", fd, pointer to actual string ) | 
| 1779 | 如果非pathbuf则 | 
| 1781 | 转到:out_unmark | 
| 1795 | 如果retval则转到:out_unmark | 
| 1798 | retval等于prepare_arg_pages(bprm, argv, envp) | 
| 1802 | 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). | 
| 1819 | would_dump(bprm, file) | 
| 1821 | retval等于exec_binprm(bprm) | 
| 1826 | in_exec等于0 | 
| 1827 | in_execve等于0 | 
| 1828 | rseq_execve(当前进程) | 
| 1829 | acct_update_integrals(当前进程) | 
| 1830 | task_numa_free(当前进程, false) | 
| 1832 | 释放内存 | 
| 1835 | 如果displaced则put_files_struct(displaced) | 
| 1837 | 返回:retval | 
| 1839 | out : | 
| 1840 | 如果mm则 | 
| 1845 | out_unmark : | 
| 1846 | in_exec等于0 | 
| 1847 | in_execve等于0 | 
| 1849 | out_free : | 
| 1851 | 释放内存 | 
| 1853 | out_files : | 
| 1854 | 如果displaced则reset_files_struct(displaced) | 
| 1856 | out_ret : | 
| 1859 | 返回:retval | 
| 名称 | 描述 | 
|---|---|
| do_execveat_common | |
| do_execve_file | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |