* LINUXTODO: deduplicate; linux_execve is common across archs, except that on * amd64 compat linuxulator it calls freebsd32_exec_copyin_args. */
| 63 | * amd64 compat linuxulator it calls freebsd32_exec_copyin_args. |
| 64 | */ |
| 65 | int |
| 66 | linux_execve(struct thread *td, struct linux_execve_args *uap) |
| 67 | { |
| 68 | struct image_args eargs; |
| 69 | char *path; |
| 70 | int error; |
| 71 | |
| 72 | if (!LUSECONVPATH(td)) { |
| 73 | error = exec_copyin_args(&eargs, uap->path, UIO_USERSPACE, |
| 74 | uap->argp, uap->envp); |
| 75 | } else { |
| 76 | LCONVPATHEXIST(td, uap->path, &path); |
| 77 | error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, |
| 78 | uap->argp, uap->envp); |
| 79 | LFREEPATH(path); |
| 80 | } |
| 81 | if (error == 0) |
| 82 | error = linux_common_execve(td, &eargs); |
| 83 | AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); |
| 84 | return (error); |
| 85 | } |
| 86 | |
| 87 | /* LINUXTODO: implement (or deduplicate) arm64 linux_set_upcall_kse */ |
| 88 | int |
nothing calls this directly
no test coverage detected