Lines Matching refs:imgp

73 static int	linux_copyout_strings(struct image_params *imgp,
82 static void linux_exec_setregs(struct thread *td, struct image_params *imgp,
151 linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) in linux_copyout_auxargs() argument
159 p = imgp->proc; in linux_copyout_auxargs()
161 args = (Elf64_Auxargs *)imgp->auxargs; in linux_copyout_auxargs()
167 imgp->proc->p_sysent->sv_shared_page_base); in linux_copyout_auxargs()
179 AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); in linux_copyout_auxargs()
180 AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); in linux_copyout_auxargs()
181 AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); in linux_copyout_auxargs()
182 AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); in linux_copyout_auxargs()
187 AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); in linux_copyout_auxargs()
188 if (imgp->execpathp != 0) in linux_copyout_auxargs()
189 AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); in linux_copyout_auxargs()
193 free(imgp->auxargs, M_TEMP); in linux_copyout_auxargs()
194 imgp->auxargs = NULL; in linux_copyout_auxargs()
204 linux_elf_fixup(uintptr_t *stack_base, struct image_params *imgp) in linux_elf_fixup() argument
219 linux_copyout_strings(struct image_params *imgp, uintptr_t *stack_base) in linux_copyout_strings() argument
231 if (imgp->execpath != NULL && imgp->auxargs != NULL) in linux_copyout_strings()
232 execpath_len = strlen(imgp->execpath) + 1; in linux_copyout_strings()
236 p = imgp->proc; in linux_copyout_strings()
243 imgp->execpathp = (void *)destp; in linux_copyout_strings()
244 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); in linux_copyout_strings()
252 imgp->canary = (void *)destp; in linux_copyout_strings()
253 error = copyout(canary, imgp->canary, sizeof(canary)); in linux_copyout_strings()
258 destp -= ARG_MAX - imgp->args->stringspace; in linux_copyout_strings()
262 if (imgp->auxargs) { in linux_copyout_strings()
277 vectp -= 1 + imgp->args->argc + 1 + imgp->args->envc + 1; in linux_copyout_strings()
283 stringp = imgp->args->begin_argv; in linux_copyout_strings()
284 argc = imgp->args->argc; in linux_copyout_strings()
285 envc = imgp->args->envc; in linux_copyout_strings()
289 ARG_MAX - imgp->args->stringspace); in linux_copyout_strings()
331 if (imgp->auxargs) { in linux_copyout_strings()
333 error = imgp->sysent->sv_copyout_auxargs(imgp, in linux_copyout_strings()
346 linux_exec_setregs(struct thread *td, struct image_params *imgp, in linux_exec_setregs() argument
358 regs->tf_lr = imgp->entry_addr; in linux_exec_setregs()
362 regs->tf_elr = imgp->entry_addr; in linux_exec_setregs()