Function report | 
Source Code:fs\exec.c | 
Create Date:2022-07-28 20:04:05 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:sys_execve() executes a new program.
Proto: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)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| 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 | If flags & set_user() noticed that RLIMIT_NPROC was exceeded && atomic_read( & processes) > rlimit(RLIMIT_NPROC) Then | 
| 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. | 
| 1749 | bprm = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 1758 | in_execve = 1 | 
| 1763 | If IS_ERR(file) Then Go to out_unmark | 
| 1769 | If Not filename Then | 
| 1770 | filename = "none" | 
| 1771 | Else if fd == Special value used to indicateopenat should use the currentworking directory. || pointer to actual string [0] == '/' Then | 
| 1772 | filename = pointer to actual string | 
| 1773 | Else | 
| 1774 | If pointer to actual string [0] == '\0' Then pathbuf = kasprintf(GFP_KERNEL, "/dev/fd/%d", fd) | 
| 1776 | Else pathbuf = kasprintf(GFP_KERNEL, "/dev/fd/%d/%s", fd, pointer to actual string ) | 
| 1779 | If Not pathbuf Then | 
| 1781 | Go to out_unmark | 
| 1788 | If close_on_exec(fd, Dependency order vs. p above. (fdt)) Then interp_flags |= BINPRM_FLAGS_PATH_INACCESSIBLE | 
| 1795 | If retval Then Go to 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(current process) | 
| 1830 | task_numa_free(current process, false) | 
| 1835 | If displaced Then put_files_struct(displaced) | 
| 1837 | Return retval | 
| 1839 | out : | 
| 1840 | If mm Then | 
| 1845 | out_unmark : | 
| 1846 | in_exec = 0 | 
| 1847 | in_execve = 0 | 
| 1849 | out_free : | 
| 1853 | out_files : | 
| 1854 | If displaced Then reset_files_struct(displaced) | 
| 1856 | out_ret : | 
| 1859 | Return retval | 
| Name | Describe | 
|---|---|
| do_execveat_common | |
| do_execve_file | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |