Home
last modified time | relevance | path

Searched refs:imgp (Results 1 – 25 of 50) sorted by relevance

12

/freebsd/sys/powerpc/powerpc/
H A Delf_common.c53 imgp->proc->p_osrel == 0) in __elfN()
56 args = (Elf_Auxargs *)imgp->auxargs; in __elfN()
60 vmspace = imgp->proc->p_vmspace; in __elfN()
72 if (imgp->execpathp != 0) in __elfN()
76 if (imgp->canary != 0) { in __elfN()
81 if (imgp->pagesizes != 0) { in __elfN()
90 != NULL && imgp->stack_prot != 0 ? imgp->stack_prot : in __elfN()
91 imgp->sysent->sv_stackprot); in __elfN()
92 if (imgp->sysent->sv_hwcap != NULL) in __elfN()
98 free(imgp->auxargs, M_TEMP); in __elfN()
[all …]
H A Delf64_machdep.c61 static void exec_setregs_funcdesc(struct thread *td, struct image_params *imgp,
244 exec_setregs_funcdesc(struct thread *td, struct image_params *imgp, in exec_setregs_funcdesc() argument
251 exec_setregs(td, imgp, stack); in exec_setregs_funcdesc()
262 (void)copyin((void *)imgp->entry_addr, entry_desc, in exec_setregs_funcdesc()
264 tf->srr0 = entry_desc[0] + imgp->reloc_base; in exec_setregs_funcdesc()
265 tf->fixreg[2] = entry_desc[1] + imgp->reloc_base; in exec_setregs_funcdesc()
266 tf->fixreg[11] = entry_desc[2] + imgp->reloc_base; in exec_setregs_funcdesc()
/freebsd/sys/kern/
H A Dkern_exec.c437 bzero(imgp, sizeof(*imgp)); in do_execve()
550 imgp->object = imgp->vp->v_object; in do_execve()
620 change_svuid(imgp->newcred, imgp->newcred->cr_uid); in do_execve()
621 change_svgid(imgp->newcred, imgp->newcred->cr_gid); in do_execve()
640 change_svuid(imgp->newcred, imgp->newcred->cr_uid); in do_execve()
641 change_svgid(imgp->newcred, imgp->newcred->cr_gid); in do_execve()
820 !(*imgp->sysent->sv_setid_allowed)(td, imgp)) || in do_execve()
855 imgp->vp, interpvplabel, imgp); in do_execve()
1687 if (imgp->execpath != NULL && imgp->auxargs != NULL) { in exec_copyout_strings()
1741 vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; in exec_copyout_strings()
[all …]
H A Dimgact_shell.c116 if (imgp->interpreted & IMGACT_SHELL) in exec_shell_imgact()
119 imgp->interpreted |= IMGACT_SHELL; in exec_shell_imgact()
127 error = VOP_GETATTR(imgp->vp, &vattr, imgp->proc->p_ucred); in exec_shell_imgact()
171 if (imgp->args->fname != NULL) { in exec_shell_imgact()
172 fname = imgp->args->fname; in exec_shell_imgact()
209 if (imgp->args->argc == 0) in exec_shell_imgact()
210 imgp->args->argc = 1; in exec_shell_imgact()
211 imgp->args->argc++; in exec_shell_imgact()
226 imgp->args->argc++; in exec_shell_imgact()
235 imgp->args->stringspace, NULL); in exec_shell_imgact()
[all …]
H A Dimgact_aout.c261 PROC_LOCK(imgp->proc); in exec_aout_imgact()
268 PROC_UNLOCK(imgp->proc); in exec_aout_imgact()
271 PROC_UNLOCK(imgp->proc); in exec_aout_imgact()
281 VOP_UNLOCK(imgp->vp); in exec_aout_imgact()
295 vmspace = imgp->proc->p_vmspace; in exec_aout_imgact()
297 object = imgp->object; in exec_aout_imgact()
313 VOP_SET_TEXT_CHECKED(imgp->vp); in exec_aout_imgact()
327 VOP_SET_TEXT_CHECKED(imgp->vp); in exec_aout_imgact()
348 error = exec_map_stack(imgp); in exec_aout_imgact()
353 imgp->interpreted = 0; in exec_aout_imgact()
[all …]
H A Dimgact_elf.c648 object = imgp->object; in __elfN()
812 imgp->proc = p; in __elfN()
813 imgp->attr = attr; in __elfN()
822 imgp->vp = nd->ni_vp; in __elfN()
872 if (imgp->firstpage) in __elfN()
876 if (imgp->textset) in __elfN()
1213 imgp->stack_prot = in __CONCAT()
1272 VOP_UNLOCK(imgp->vp); in __CONCAT()
1344 error = __elfN(load_sections)(imgp, hdr, phdr, imgp->et_dyn_addr, NULL); in __CONCAT()
1478 != NULL && imgp->stack_prot != 0 ? imgp->stack_prot : in __elfN()
[all …]
H A Dimgact_binmisc.c621 imgact_binmisc_exec(struct image_params *imgp) in imgact_binmisc_exec() argument
623 const char *image_header = imgp->image_header; in imgact_binmisc_exec()
644 if (imgp->interpreted & IMGACT_BINMISC) { in imgact_binmisc_exec()
649 imgp->interpreted |= IMGACT_BINMISC; in imgact_binmisc_exec()
656 if (imgp->args->fname != NULL) { in imgact_binmisc_exec()
657 fname = imgp->args->fname; in imgact_binmisc_exec()
661 sbuf_printf(sname, "/dev/fd/%d", imgp->args->fd); in imgact_binmisc_exec()
690 imgp->args->argc += ibe->ibe_interp_argcnt; in imgact_binmisc_exec()
697 d = imgp->args->begin_argv; in imgact_binmisc_exec()
732 imgp->interpreter_name = imgp->args->begin_argv; in imgact_binmisc_exec()
[all …]
/freebsd/sys/compat/linux/
H A Dlinux_elf.c339 p = imgp->proc; in __linuxN()
346 if (imgp->execpath != NULL && imgp->auxargs != NULL) { in __linuxN()
351 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); in __linuxN()
374 if (imgp->auxargs) { in __linuxN()
389 vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; in __linuxN()
416 imgp->argv = vectp; in __linuxN()
436 imgp->envv = vectp; in __linuxN()
456 if (imgp->auxargs) { in __linuxN()
458 error = imgp->sysent->sv_copyout_auxargs(imgp, in __linuxN()
498 p = imgp->proc; in __linuxN()
[all …]
H A Dlinux_emul.c257 linux_on_exec(struct proc *p, struct image_params *imgp) in linux_on_exec() argument
267 MPASS((imgp->sysent->sv_flags & SV_ABI_MASK) == SV_ABI_LINUX); in linux_on_exec()
308 imgp->stack_prot & VM_PROT_EXECUTE) { in linux_on_exec()
H A Dlinux_vdso.c156 vm_offset_t size, struct image_params *imgp) in linux_map_vdso() argument
162 MPASS((imgp->sysent->sv_flags & SV_ABI_MASK) == SV_ABI_LINUX); in linux_map_vdso()
/freebsd/sys/i386/linux/
H A Dimgact_linux.c58 exec_linux_imgact(struct image_params *imgp) in exec_linux_imgact() argument
106 PROC_LOCK(imgp->proc); in exec_linux_imgact()
110 PROC_UNLOCK(imgp->proc); in exec_linux_imgact()
113 PROC_UNLOCK(imgp->proc); in exec_linux_imgact()
115 VOP_UNLOCK(imgp->vp); in exec_linux_imgact()
123 vmspace = imgp->proc->p_vmspace; in exec_linux_imgact()
213 error = exec_map_stack(imgp); in exec_linux_imgact()
218 imgp->interpreted = 0; in exec_linux_imgact()
219 imgp->entry_addr = a_out->a_entry; in exec_linux_imgact()
221 imgp->proc->p_sysent = &linux_sysvec; in exec_linux_imgact()
[all …]
H A Dlinux_sysvec.c103 struct image_params *imgp, uintptr_t stack);
106 struct image_params *imgp);
121 linux_fixup(uintptr_t *stack_base, struct image_params *imgp) in linux_fixup() argument
127 envp = base + (imgp->args->argc + 1); in linux_fixup()
135 if (suword(base, imgp->args->argc) != 0) in linux_fixup()
142 linux32_arch_copyout_auxargs(struct image_params *imgp, Elf_Auxinfo **pos) in linux32_arch_copyout_auxargs() argument
565 linux_exec_setregs(struct thread *td, struct image_params *imgp, in linux_exec_setregs() argument
570 exec_setregs(td, imgp, stack); in linux_exec_setregs()
661 linux_on_exec_vmspace(struct proc *p, struct image_params *imgp) in linux_on_exec_vmspace() argument
667 linux_vdso_base, LINUX_VDSOPAGE_SIZE, imgp); in linux_on_exec_vmspace()
[all …]
/freebsd/sys/security/mac_veriexec/
H A Dveriexec_fingerprint.c110 parent = imgp->proc->p_pptr; in identify_error()
117 (imgp->args != NULL) ? imgp->args->fname : "", in identify_error()
118 (uintmax_t)imgp->attr->va_fsid, (uintmax_t)imgp->attr->va_fileid, in identify_error()
119 imgp->attr->va_gen, td->td_ucred->cr_ruid, imgp->proc->p_pid, in identify_error()
262 struct vnode *vp = imgp->vp; in mac_veriexec_fingerprint_check_image()
298 if (!imgp->interpreted && in mac_veriexec_fingerprint_check_image()
300 identify_error(imgp, td, "attempted direct execution"); in mac_veriexec_fingerprint_check_image()
308 identify_error(imgp, td, in mac_veriexec_fingerprint_check_image()
316 identify_error(imgp, td, "no fingerprint"); in mac_veriexec_fingerprint_check_image()
323 identify_error(imgp, td, "no signatures for device"); in mac_veriexec_fingerprint_check_image()
[all …]
/freebsd/sys/amd64/linux32/
H A Dlinux32_sysvec.c109 struct image_params *imgp);
593 regs->tf_rip = imgp->entry_addr; in linux_exec_setregs()
630 if (imgp->execpath != NULL && imgp->auxargs != NULL) { in linux_copyout_strings()
635 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); in linux_copyout_strings()
643 imgp->canary = (void *)destp; in linux_copyout_strings()
653 if (imgp->auxargs) { in linux_copyout_strings()
668 vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; in linux_copyout_strings()
674 argc = imgp->args->argc; in linux_copyout_strings()
675 envc = imgp->args->envc; in linux_copyout_strings()
718 if (imgp->auxargs) { in linux_copyout_strings()
[all …]
/freebsd/sys/arm64/arm64/
H A Delf32_machdep.c75 static void freebsd32_setregs(struct thread *td, struct image_params *imgp,
170 elf32_arm_abi_supported(const struct image_params *imgp, in elf32_arm_abi_supported() argument
176 hdr = (const Elf32_Ehdr *)imgp->image_header; in elf32_arm_abi_supported()
182 imgp->args->fname); in elf32_arm_abi_supported()
273 freebsd32_setregs(struct thread *td, struct image_params *imgp, in freebsd32_setregs() argument
290 tf->tf_x[14] = imgp->entry_addr; in freebsd32_setregs()
291 tf->tf_elr = imgp->entry_addr; in freebsd32_setregs()
293 if ((uint32_t)imgp->entry_addr & 1) in freebsd32_setregs()
H A Delf_machdep.c351 arm64_exec_protect(struct image_params *imgp, int flags __unused) in arm64_exec_protect() argument
363 hdr = (const Elf_Ehdr *)imgp->image_header; in arm64_exec_protect()
364 phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); in arm64_exec_protect()
368 if (phdr[i].p_type == PT_NOTE && __elfN(parse_notes)(imgp, in arm64_exec_protect()
382 sva = phdr[i].p_vaddr + imgp->et_dyn_addr; in arm64_exec_protect()
384 pmap_bti_set(vmspace_pmap(imgp->proc->p_vmspace), sva, eva); in arm64_exec_protect()
/freebsd/sys/security/mac/
H A Dmac_process.c134 mac_execve_enter(struct image_params *imgp, struct mac *mac_p) in mac_execve_enter() argument
169 imgp->execlabel = label; in mac_execve_enter()
174 mac_execve_exit(struct image_params *imgp) in mac_execve_exit() argument
176 if (imgp->execlabel != NULL) { in mac_execve_exit()
177 mac_cred_label_free(imgp->execlabel); in mac_execve_exit()
178 imgp->execlabel = NULL; in mac_execve_exit()
H A Dmac_vfs.c344 struct vnode *vp, struct label *interpvplabel, struct image_params *imgp) in mac_vnode_execve_transition() argument
350 vp->v_label, interpvplabel, imgp, imgp->execlabel); in mac_vnode_execve_transition()
355 struct label *interpvplabel, struct image_params *imgp) in mac_vnode_execve_will_transition() argument
364 vp->v_label, interpvplabel, imgp, imgp->execlabel); in mac_vnode_execve_will_transition()
476 struct image_params *imgp) in mac_vnode_check_exec() argument
482 MAC_POLICY_CHECK(vnode_check_exec, cred, vp, vp->v_label, imgp, in mac_vnode_check_exec()
483 imgp->execlabel); in mac_vnode_check_exec()
484 MAC_CHECK_PROBE3(vnode_check_exec, error, cred, vp, imgp); in mac_vnode_check_exec()
/freebsd/sys/arm64/linux/
H A Dlinux_sysvec.c101 static void linux_exec_setregs(struct thread *td, struct image_params *imgp,
105 struct image_params *imgp);
153 linux64_arch_copyout_auxargs(struct image_params *imgp, Elf_Auxinfo **pos) in linux64_arch_copyout_auxargs() argument
157 AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP, *imgp->sysent->sv_hwcap); in linux64_arch_copyout_auxargs()
158 AUXARGS_ENTRY((*pos), LINUX_AT_HWCAP2, *imgp->sysent->sv_hwcap2); in linux64_arch_copyout_auxargs()
166 linux_exec_setregs(struct thread *td, struct image_params *imgp, in linux_exec_setregs() argument
174 regs->tf_elr = imgp->entry_addr; in linux_exec_setregs()
468 linux_on_exec_vmspace(struct proc *p, struct image_params *imgp) in linux_on_exec_vmspace() argument
473 LINUX_VDSOPAGE_SIZE, imgp); in linux_on_exec_vmspace()
475 error = linux_on_exec(p, imgp); in linux_on_exec_vmspace()
/freebsd/sys/dev/filemon/
H A Dfilemon_wrapper.c118 struct image_params *imgp) in filemon_event_process_exec() argument
125 imgp->execpath != NULL ? imgp->execpath : "<unknown>"); in filemon_event_process_exec()
128 if (imgp->newcred != NULL && in filemon_event_process_exec()
129 imgp->credential_setid && in filemon_event_process_exec()
/freebsd/sys/security/mac_grantbylabel/
H A Dmac_grantbylabel.c446 struct image_params *imgp, struct label *execlabel __unused) in mac_grantbylabel_vnode_check_exec() argument
473 struct label *interpvplabel, struct image_params *imgp, in mac_grantbylabel_vnode_execve_will_transition() argument
478 if (imgp->interpreted) { in mac_grantbylabel_vnode_execve_will_transition()
481 SLOT_SET(imgp->proc->p_label, gbl); in mac_grantbylabel_vnode_execve_will_transition()
/freebsd/sys/arm/arm/
H A Delf_machdep.c124 elf32_arm_abi_supported(const struct image_params *imgp, in elf32_arm_abi_supported() argument
127 const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; in elf32_arm_abi_supported()
135 EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); in elf32_arm_abi_supported()
H A Dexec_machdep.c77 exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) in exec_setregs() argument
83 tf->tf_usr_lr = imgp->entry_addr; in exec_setregs()
85 tf->tf_pc = imgp->entry_addr; in exec_setregs()
87 if ((register_t)imgp->entry_addr & 1) in exec_setregs()
/freebsd/sys/amd64/linux/
H A Dlinux_sysvec.c108 static void linux_exec_setregs(struct thread *td, struct image_params *imgp,
112 struct image_params *imgp);
222 linux64_arch_copyout_auxargs(struct image_params *imgp, Elf_Auxinfo **pos) in linux64_arch_copyout_auxargs() argument
235 linux_exec_setregs(struct thread *td, struct image_params *imgp, in linux_exec_setregs() argument
256 regs->tf_rip = imgp->entry_addr; in linux_exec_setregs()
722 linux_on_exec_vmspace(struct proc *p, struct image_params *imgp) in linux_on_exec_vmspace() argument
727 LINUX_VDSOPAGE_SIZE, imgp); in linux_on_exec_vmspace()
729 error = linux_on_exec(p, imgp); in linux_on_exec_vmspace()
/freebsd/sys/compat/freebsd32/
H A Dfreebsd32_misc.c3606 sysent = imgp->sysent; in freebsd32_copyout_strings()
3628 if (imgp->execpath != NULL && imgp->auxargs != NULL) { in freebsd32_copyout_strings()
3632 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); in freebsd32_copyout_strings()
3668 if (imgp->auxargs) { in freebsd32_copyout_strings()
3683 vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; in freebsd32_copyout_strings()
3691 argc = imgp->args->argc; in freebsd32_copyout_strings()
3692 envc = imgp->args->envc; in freebsd32_copyout_strings()
3704 imgp->argv = vectp; in freebsd32_copyout_strings()
3724 imgp->envv = vectp; in freebsd32_copyout_strings()
3744 if (imgp->auxargs) { in freebsd32_copyout_strings()
[all …]

12