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

Function kern_execve

freebsd/kern/kern_exec.c:344–354  ·  view source on GitHub ↗

* kern_execve() has the astonishing property of not always returning to * the caller. If sufficiently bad things happen during the call to * do_execve(), it can end up calling exit1(); as a result, callers must * avoid doing anything which they might need to undo (e.g., allocating * memory). */

Source from the content-addressed store, hash-verified

342 * memory).
343 */
344int
345kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p,
346 struct vmspace *oldvmspace)
347{
348
349 AUDIT_ARG_ARGV(args->begin_argv, args->argc,
350 exec_args_get_begin_envv(args) - args->begin_argv);
351 AUDIT_ARG_ENVV(exec_args_get_begin_envv(args), args->envc,
352 args->endp - exec_args_get_begin_envv(args));
353 return (do_execve(td, args, mac_p, oldvmspace));
354}
355
356/*
357 * In-kernel implementation of execve(). All arguments are assumed to be

Callers 4

sys_execveFunction · 0.85
sys_fexecveFunction · 0.85
sys___mac_execveFunction · 0.85
start_initFunction · 0.85

Calls 2

exec_args_get_begin_envvFunction · 0.85
do_execveFunction · 0.85

Tested by

no test coverage detected