MCPcopy Create free account
hub / github.com/F-Stack/f-stack / linux_execve

Function linux_execve

freebsd/arm64/linux/linux_machdep.c:65–85  ·  view source on GitHub ↗

* LINUXTODO: deduplicate; linux_execve is common across archs, except that on * amd64 compat linuxulator it calls freebsd32_exec_copyin_args. */

Source from the content-addressed store, hash-verified

63 * amd64 compat linuxulator it calls freebsd32_exec_copyin_args.
64 */
65int
66linux_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 */
88int

Callers

nothing calls this directly

Calls 1

exec_copyin_argsFunction · 0.85

Tested by

no test coverage detected