| /f-stack/freebsd/kern/ |
| H A D | kern_exec.c | 409 bzero(imgp, sizeof(*imgp)); in do_execve() 478 imgp->object = imgp->vp->v_object; in do_execve() 547 change_svuid(imgp->newcred, imgp->newcred->cr_uid); in do_execve() 548 change_svgid(imgp->newcred, imgp->newcred->cr_gid); in do_execve() 567 change_svuid(imgp->newcred, imgp->newcred->cr_uid); in do_execve() 568 change_svgid(imgp->newcred, imgp->newcred->cr_gid); in do_execve() 580 if (vn_fullpath(imgp->vp, &imgp->execpath, &imgp->freepath) != 0) in do_execve() 805 imgp->vp, interpvplabel, imgp); in do_execve() 1551 imgp->sysent->sv_stackgap(imgp, dp); in exec_stackgap() 1577 if (imgp->execpath != NULL && imgp->auxargs != NULL) in exec_copyout_strings() [all …]
|
| H A D | imgact_shell.c | 119 if (imgp->interpreted & IMGACT_SHELL) in exec_shell_imgact() 122 imgp->interpreted |= IMGACT_SHELL; in exec_shell_imgact() 130 error = VOP_GETATTR(imgp->vp, &vattr, imgp->proc->p_ucred); in exec_shell_imgact() 174 if (imgp->args->fname != NULL) { in exec_shell_imgact() 175 fname = imgp->args->fname; in exec_shell_imgact() 212 if (imgp->args->argc == 0) in exec_shell_imgact() 213 imgp->args->argc = 1; in exec_shell_imgact() 214 imgp->args->argc++; in exec_shell_imgact() 229 imgp->args->argc++; in exec_shell_imgact() 238 imgp->args->stringspace, NULL); in exec_shell_imgact() [all …]
|
| H A D | imgact_aout.c | 241 PROC_LOCK(imgp->proc); in exec_aout_imgact() 248 PROC_UNLOCK(imgp->proc); in exec_aout_imgact() 251 PROC_UNLOCK(imgp->proc); in exec_aout_imgact() 261 VOP_UNLOCK(imgp->vp); in exec_aout_imgact() 275 vmspace = imgp->proc->p_vmspace; in exec_aout_imgact() 277 object = imgp->object; in exec_aout_imgact() 293 VOP_SET_TEXT_CHECKED(imgp->vp); in exec_aout_imgact() 307 VOP_SET_TEXT_CHECKED(imgp->vp); in exec_aout_imgact() 329 imgp->interpreted = 0; in exec_aout_imgact() 330 imgp->entry_addr = a_out->a_entry; in exec_aout_imgact() [all …]
|
| H A D | imgact_elf.c | 624 object = imgp->object; in __elfN() 788 imgp->proc = p; in __elfN() 789 imgp->attr = attr; in __elfN() 798 imgp->vp = nd->ni_vp; in __elfN() 845 if (imgp->firstpage) in __elfN() 849 if (imgp->textset) in __elfN() 933 PROC_LOCK(imgp->proc); in __elfN() 1158 imgp->stack_prot = in __CONCAT() 1211 VOP_UNLOCK(imgp->vp); in __CONCAT() 1387 != NULL && imgp->stack_prot != 0 ? imgp->stack_prot : in __elfN() [all …]
|
| H A D | imgact_binmisc.c | 589 imgact_binmisc_exec(struct image_params *imgp) in imgact_binmisc_exec() argument 591 const char *image_header = imgp->image_header; in imgact_binmisc_exec() 612 if (imgp->interpreted & IMGACT_BINMISC) { in imgact_binmisc_exec() 617 imgp->interpreted |= IMGACT_BINMISC; in imgact_binmisc_exec() 624 if (imgp->args->fname != NULL) { in imgact_binmisc_exec() 625 fname = imgp->args->fname; in imgact_binmisc_exec() 629 sbuf_printf(sname, "/dev/fd/%d", imgp->args->fd); in imgact_binmisc_exec() 652 error = exec_args_adjust_args(imgp->args, 0, offset); in imgact_binmisc_exec() 658 imgp->args->argc += ibe->ibe_interp_argcnt; in imgact_binmisc_exec() 665 d = imgp->args->begin_argv; in imgact_binmisc_exec() [all …]
|
| /f-stack/freebsd/arm64/linux/ |
| H A D | linux_sysvec.c | 159 p = imgp->proc; in linux_copyout_auxargs() 194 imgp->auxargs = NULL; in linux_copyout_auxargs() 231 if (imgp->execpath != NULL && imgp->auxargs != NULL) in linux_copyout_strings() 236 p = imgp->proc; in linux_copyout_strings() 244 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); 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() 284 argc = imgp->args->argc; in linux_copyout_strings() 285 envc = imgp->args->envc; in linux_copyout_strings() 331 if (imgp->auxargs) { in linux_copyout_strings() [all …]
|
| /f-stack/freebsd/i386/linux/ |
| H A D | imgact_linux.c | 61 exec_linux_imgact(struct image_params *imgp) in exec_linux_imgact() argument 109 PROC_LOCK(imgp->proc); in exec_linux_imgact() 113 PROC_UNLOCK(imgp->proc); in exec_linux_imgact() 116 PROC_UNLOCK(imgp->proc); in exec_linux_imgact() 118 VOP_UNLOCK(imgp->vp); in exec_linux_imgact() 123 error = exec_new_vmspace(imgp, &linux_sysvec); in exec_linux_imgact() 126 vmspace = imgp->proc->p_vmspace; in exec_linux_imgact() 217 imgp->interpreted = 0; in exec_linux_imgact() 218 imgp->entry_addr = a_out->a_entry; in exec_linux_imgact() 220 imgp->proc->p_sysent = &linux_sysvec; in exec_linux_imgact() [all …]
|
| H A D | linux_sysvec.c | 199 p = imgp->proc; in linux_copyout_auxargs() 243 imgp->auxargs = NULL; in linux_copyout_auxargs() 281 p = imgp->proc; in linux_copyout_strings() 282 if (imgp->execpath != NULL && imgp->auxargs != NULL) in linux_copyout_strings() 300 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); in linux_copyout_strings() 318 if (imgp->auxargs) { in linux_copyout_strings() 333 vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; in linux_copyout_strings() 339 argc = imgp->args->argc; in linux_copyout_strings() 340 envc = imgp->args->envc; in linux_copyout_strings() 383 if (imgp->auxargs) { in linux_copyout_strings() [all …]
|
| /f-stack/freebsd/security/mac_veriexec/ |
| H A D | veriexec_fingerprint.c | 107 parent = imgp->proc->p_pptr; in identify_error() 114 (imgp->args != NULL) ? imgp->args->fname : "", in identify_error() 115 (uintmax_t)imgp->attr->va_fsid, (uintmax_t)imgp->attr->va_fileid, in identify_error() 116 imgp->attr->va_gen, td->td_ucred->cr_ruid, imgp->proc->p_pid, in identify_error() 259 struct vnode *vp = imgp->vp; in mac_veriexec_fingerprint_check_image() 295 if (!imgp->interpreted) { in mac_veriexec_fingerprint_check_image() 296 identify_error(imgp, td, "attempted direct execution"); in mac_veriexec_fingerprint_check_image() 304 identify_error(imgp, td, in mac_veriexec_fingerprint_check_image() 312 identify_error(imgp, td, "no fingerprint"); in mac_veriexec_fingerprint_check_image() 319 identify_error(imgp, td, "no signatures for device"); in mac_veriexec_fingerprint_check_image() [all …]
|
| H A D | mac_veriexec_internal.h | 90 int mac_veriexec_fingerprint_check_image(struct image_params *imgp,
|
| /f-stack/freebsd/amd64/linux/ |
| H A D | linux_sysvec.c | 259 p = imgp->proc; in linux_copyout_auxargs() 290 imgp->auxargs = NULL; in linux_copyout_auxargs() 331 if (imgp->execpath != NULL && imgp->auxargs != NULL) in linux_copyout_strings() 336 p = imgp->proc; in linux_copyout_strings() 344 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); 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() 389 argc = imgp->args->argc; in linux_copyout_strings() 390 envc = imgp->args->envc; in linux_copyout_strings() 433 if (imgp->auxargs) { in linux_copyout_strings() [all …]
|
| /f-stack/freebsd/amd64/linux32/ |
| H A D | linux32_sysvec.c | 231 if (imgp->execpathp != 0) in linux_copyout_auxargs() 237 free(imgp->auxargs, M_TEMP); in linux_copyout_auxargs() 238 imgp->auxargs = NULL; in linux_copyout_auxargs() 746 if (imgp->execpath != NULL && imgp->auxargs != NULL) in linux_copyout_strings() 758 error = copyout(imgp->execpath, imgp->execpathp, execpath_len); 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() 797 argc = imgp->args->argc; in linux_copyout_strings() 798 envc = imgp->args->envc; in linux_copyout_strings() 841 if (imgp->auxargs) { in linux_copyout_strings() [all …]
|
| /f-stack/freebsd/arm64/arm64/ |
| H A D | elf32_machdep.c | 68 static void freebsd32_setregs(struct thread *td, struct image_params *imgp, 129 elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, in elf32_arm_abi_supported() argument 141 hdr = (const Elf32_Ehdr *)imgp->image_header; in elf32_arm_abi_supported() 147 imgp->args->fname); in elf32_arm_abi_supported() 235 freebsd32_setregs(struct thread *td, struct image_params *imgp, in freebsd32_setregs() argument 251 tf->tf_x[14] = imgp->entry_addr; in freebsd32_setregs() 252 tf->tf_elr = imgp->entry_addr; in freebsd32_setregs()
|
| /f-stack/freebsd/i386/cloudabi32/ |
| H A D | cloudabi32_sysvec.c | 51 cloudabi32_fixup_tcb(uintptr_t *stack_base, struct image_params *imgp) in cloudabi32_fixup_tcb() argument 57 error = cloudabi32_fixup(stack_base, imgp); in cloudabi32_fixup_tcb() 79 cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp, in cloudabi32_proc_setregs() argument 83 exec_setregs(td, imgp, stack); in cloudabi32_proc_setregs()
|
| /f-stack/freebsd/amd64/cloudabi32/ |
| H A D | cloudabi32_sysvec.c | 56 cloudabi32_fixup_tcb(uintptr_t *stack_base, struct image_params *imgp) in cloudabi32_fixup_tcb() argument 62 error = cloudabi32_fixup(stack_base, imgp); in cloudabi32_fixup_tcb() 84 cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp, in cloudabi32_proc_setregs() argument 88 ia32_setregs(td, imgp, stack); in cloudabi32_proc_setregs()
|
| /f-stack/freebsd/security/mac/ |
| H A D | mac_process.c | 136 mac_execve_enter(struct image_params *imgp, struct mac *mac_p) in mac_execve_enter() argument 171 imgp->execlabel = label; in mac_execve_enter() 176 mac_execve_exit(struct image_params *imgp) in mac_execve_exit() argument 178 if (imgp->execlabel != NULL) { in mac_execve_exit() 179 mac_cred_label_free(imgp->execlabel); in mac_execve_exit() 180 imgp->execlabel = NULL; in mac_execve_exit()
|
| H A D | mac_vfs.c | 346 struct vnode *vp, struct label *interpvplabel, struct image_params *imgp) in mac_vnode_execve_transition() argument 352 vp->v_label, interpvplabel, imgp, imgp->execlabel); in mac_vnode_execve_transition() 357 struct label *interpvplabel, struct image_params *imgp) in mac_vnode_execve_will_transition() argument 366 vp->v_label, interpvplabel, imgp, imgp->execlabel); in mac_vnode_execve_will_transition() 478 struct image_params *imgp) in mac_vnode_check_exec() argument 484 MAC_POLICY_CHECK(vnode_check_exec, cred, vp, vp->v_label, imgp, in mac_vnode_check_exec() 485 imgp->execlabel); in mac_vnode_check_exec() 486 MAC_CHECK_PROBE3(vnode_check_exec, error, cred, vp, imgp); in mac_vnode_check_exec()
|
| H A D | mac_framework.h | 322 int mac_execve_enter(struct image_params *imgp, struct mac *mac_p); 323 void mac_execve_exit(struct image_params *imgp); 455 struct image_params *imgp); 645 struct label *interpvplabel, struct image_params *imgp); 648 struct image_params *imgp);
|
| /f-stack/freebsd/amd64/cloudabi64/ |
| H A D | cloudabi64_sysvec.c | 51 cloudabi64_fixup_tcb(uintptr_t *stack_base, struct image_params *imgp) in cloudabi64_fixup_tcb() argument 57 error = cloudabi64_fixup(stack_base, imgp); in cloudabi64_fixup_tcb() 72 cloudabi64_proc_setregs(struct thread *td, struct image_params *imgp, in cloudabi64_proc_setregs() argument 77 exec_setregs(td, imgp, stack); in cloudabi64_proc_setregs()
|
| /f-stack/freebsd/arm/arm/ |
| H A D | elf_machdep.c | 121 elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, in elf32_arm_abi_supported() argument 124 const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; in elf32_arm_abi_supported() 132 EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); in elf32_arm_abi_supported()
|
| /f-stack/freebsd/arm64/cloudabi64/ |
| H A D | cloudabi64_sysvec.c | 51 cloudabi64_proc_setregs(struct thread *td, struct image_params *imgp, in cloudabi64_proc_setregs() argument 56 exec_setregs(td, imgp, stack); in cloudabi64_proc_setregs()
|
| /f-stack/freebsd/arm64/cloudabi32/ |
| H A D | cloudabi32_sysvec.c | 51 cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp, in cloudabi32_proc_setregs() argument 61 regs->tf_elr = imgp->entry_addr; in cloudabi32_proc_setregs()
|
| /f-stack/freebsd/arm/cloudabi32/ |
| H A D | cloudabi32_sysvec.c | 51 cloudabi32_proc_setregs(struct thread *td, struct image_params *imgp, in cloudabi32_proc_setregs() argument 56 exec_setregs(td, imgp, stack); in cloudabi32_proc_setregs()
|
| /f-stack/freebsd/amd64/amd64/ |
| H A D | elf_machdep.c | 148 freebsd_brand_info_la57_img_compat(struct image_params *imgp, in freebsd_brand_info_la57_img_compat() argument 151 if ((imgp->proc->p_md.md_flags & P_MD_LA57) != 0) in freebsd_brand_info_la57_img_compat() 155 if ((imgp->proc->p_md.md_flags & P_MD_LA48) != 0) in freebsd_brand_info_la57_img_compat()
|
| /f-stack/freebsd/mips/mips/ |
| H A D | pm_machdep.c | 409 exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) in exec_setregs() argument 438 td->td_frame->pc = imgp->entry_addr & ~3; in exec_setregs() 439 td->td_frame->t9 = imgp->entry_addr & ~3; /* abicall req */ in exec_setregs() 467 td->td_frame->a3 = (register_t)imgp->ps_strings; in exec_setregs()
|