Lines Matching refs:imgp
99 static int linux_copyout_strings(struct image_params *imgp,
108 static void linux_exec_setregs(struct thread *td, struct image_params *imgp,
252 linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) in linux_copyout_auxargs() argument
259 p = imgp->proc; in linux_copyout_auxargs()
260 args = (Elf64_Auxargs *)imgp->auxargs; in linux_copyout_auxargs()
266 imgp->proc->p_sysent->sv_shared_page_base); in linux_copyout_auxargs()
276 AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); in linux_copyout_auxargs()
277 AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); in linux_copyout_auxargs()
278 AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); in linux_copyout_auxargs()
279 AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); in linux_copyout_auxargs()
282 AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); in linux_copyout_auxargs()
283 if (imgp->execpathp != 0) in linux_copyout_auxargs()
284 AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); in linux_copyout_auxargs()
289 free(imgp->auxargs, M_TEMP); in linux_copyout_auxargs()
290 imgp->auxargs = NULL; in linux_copyout_auxargs()
300 linux_fixup_elf(uintptr_t *stack_base, struct image_params *imgp) in linux_fixup_elf() argument
306 if (suword(base, (uint64_t)imgp->args->argc) == -1) in linux_fixup_elf()
319 linux_copyout_strings(struct image_params *imgp, uintptr_t *stack_base) in linux_copyout_strings() argument
331 if (imgp->execpath != NULL && imgp->auxargs != NULL) in linux_copyout_strings()
332 execpath_len = strlen(imgp->execpath) + 1; in linux_copyout_strings()
336 p = imgp->proc; in linux_copyout_strings()
343 imgp->execpathp = (void *)destp; in linux_copyout_strings()
344 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); in linux_copyout_strings()
352 imgp->canary = (void *)destp; in linux_copyout_strings()
353 error = copyout(canary, imgp->canary, sizeof(canary)); in linux_copyout_strings()
358 destp -= ARG_MAX - imgp->args->stringspace; in linux_copyout_strings()
362 if (imgp->auxargs) { in linux_copyout_strings()
377 vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; in linux_copyout_strings()
388 stringp = imgp->args->begin_argv; in linux_copyout_strings()
389 argc = imgp->args->argc; in linux_copyout_strings()
390 envc = imgp->args->envc; in linux_copyout_strings()
394 ARG_MAX - imgp->args->stringspace); in linux_copyout_strings()
433 if (imgp->auxargs) { in linux_copyout_strings()
435 error = imgp->sysent->sv_copyout_auxargs(imgp, in linux_copyout_strings()
448 linux_exec_setregs(struct thread *td, struct image_params *imgp, in linux_exec_setregs() argument
469 regs->tf_rip = imgp->entry_addr; in linux_exec_setregs()