Lines Matching refs:imgp
106 static int linux_copyout_strings(struct image_params *imgp,
110 struct image_params *imgp, uintptr_t stack);
191 linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) in linux_copyout_auxargs() argument
197 args = (Elf32_Auxargs *)imgp->auxargs; in linux_copyout_auxargs()
201 issetugid = imgp->proc->p_flag & P_SUGID ? 1 : 0; in linux_copyout_auxargs()
203 imgp->proc->p_sysent->sv_shared_page_base); in linux_copyout_auxargs()
225 AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); in linux_copyout_auxargs()
226 AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); in linux_copyout_auxargs()
227 AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); in linux_copyout_auxargs()
228 AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); in linux_copyout_auxargs()
230 AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, PTROUT(imgp->canary)); in linux_copyout_auxargs()
231 if (imgp->execpathp != 0) in linux_copyout_auxargs()
232 AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); in linux_copyout_auxargs()
237 free(imgp->auxargs, M_TEMP); in linux_copyout_auxargs()
238 imgp->auxargs = NULL; in linux_copyout_auxargs()
248 linux_fixup_elf(uintptr_t *stack_base, struct image_params *imgp) in linux_fixup_elf() argument
254 if (suword32(base, (uint32_t)imgp->args->argc) == -1) in linux_fixup_elf()
690 linux_exec_setregs(struct thread *td, struct image_params *imgp, in linux_exec_setregs() argument
713 regs->tf_rip = imgp->entry_addr; in linux_exec_setregs()
723 regs->tf_rbx = (register_t)imgp->ps_strings; in linux_exec_setregs()
735 linux_copyout_strings(struct image_params *imgp, uintptr_t *stack_base) in linux_copyout_strings() argument
746 if (imgp->execpath != NULL && imgp->auxargs != NULL) in linux_copyout_strings()
747 execpath_len = strlen(imgp->execpath) + 1; in linux_copyout_strings()
757 imgp->execpathp = (void *)destp; in linux_copyout_strings()
758 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); in linux_copyout_strings()
766 imgp->canary = (void *)destp; in linux_copyout_strings()
767 error = copyout(canary, imgp->canary, sizeof(canary)); in linux_copyout_strings()
772 destp -= ARG_MAX - imgp->args->stringspace; in linux_copyout_strings()
776 if (imgp->auxargs) { in linux_copyout_strings()
791 vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; in linux_copyout_strings()
796 stringp = imgp->args->begin_argv; in linux_copyout_strings()
797 argc = imgp->args->argc; in linux_copyout_strings()
798 envc = imgp->args->envc; in linux_copyout_strings()
802 ARG_MAX - imgp->args->stringspace); in linux_copyout_strings()
841 if (imgp->auxargs) { in linux_copyout_strings()
843 error = imgp->sysent->sv_copyout_auxargs(imgp, in linux_copyout_strings()