| /linux/fs/ |
| A D | exec.c | 494 bprm->argmin = bprm->p - limit; in bprm_set_stack_limit() 501 return bprm->p < bprm->argmin; in bprm_hit_stack_limit() 536 if (bprm->argc < 0 || bprm->envc < 0) in bprm_stack_limits() 1272 would_dump(bprm, bprm->file); in begin_new_exec() 1497 if (bprm->interp != bprm->filename) in free_bprm() 1544 bprm->filename = bprm->fdpath; in alloc_bprm() 1546 bprm->interp = bprm->filename; in alloc_bprm() 1560 if (bprm->interp != bprm->filename) in bprm_change_interp() 1801 bprm->file = bprm->interpreter; in exec_binprm() 1929 bprm->exec = bprm->p; in do_execveat_common() [all …]
|
| A D | binfmt_script.c | 41 if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!')) in load_script() 58 buf_end = bprm->buf + sizeof(bprm->buf) - 1; in load_script() 59 i_end = strnchr(bprm->buf, sizeof(bprm->buf), '\n'); in load_script() 106 retval = remove_arg_zero(bprm); in load_script() 109 retval = copy_string_kernel(bprm->interp, bprm); in load_script() 112 bprm->argc++; in load_script() 116 retval = copy_string_kernel(i_arg, bprm); in load_script() 119 bprm->argc++; in load_script() 121 retval = copy_string_kernel(i_name, bprm); in load_script() 124 bprm->argc++; in load_script() [all …]
|
| A D | binfmt_flat.c | 117 sp -= bprm->envc + 1; in create_flat_tables() 118 sp -= bprm->argc + 1; in create_flat_tables() 126 if (put_user(bprm->argc, sp++)) in create_flat_tables() 137 for (i = bprm->argc; i > 0; i--) { in create_flat_tables() 150 for (i = bprm->envc; i > 0; i--) { in create_flat_tables() 509 ret = begin_new_exec(bprm); in load_flat_file() 515 setup_new_exec(bprm); in load_flat_file() 677 result = read_code(bprm->file, datapos, in load_flat_file() 716 "Load", bprm->filename, in load_flat_file() 904 res = create_flat_tables(bprm, bprm->p); in load_flat_binary() [all …]
|
| A D | binfmt_misc.c | 91 struct linux_binprm *bprm) in search_binfmt_handler() argument 93 char *p = strrchr(bprm->interp, '.'); in search_binfmt_handler() 113 s = bprm->buf + e->offset; in search_binfmt_handler() 141 struct linux_binprm *bprm) in get_binfmt_handler() argument 225 retval = remove_arg_zero(bprm); in load_misc_binary() 231 bprm->have_execfd = 1; in load_misc_binary() 234 retval = copy_string_kernel(bprm->interp, bprm); in load_misc_binary() 237 bprm->argc++; in load_misc_binary() 243 bprm->argc++; in load_misc_binary() 258 bprm->interpreter = interp_file; in load_misc_binary() [all …]
|
| A D | binfmt_elf_fdpic.c | 274 would_dump(bprm, interpreter); in load_elf_fdpic_binary() 341 retval = begin_new_exec(bprm); in load_elf_fdpic_binary() 354 setup_new_exec(bprm); in load_elf_fdpic_binary() 460 finalize_exec(bprm); in load_elf_fdpic_binary() 515 sp = arch_align_stack(bprm->p); in create_elf_fdpic_tables() 590 if (bprm->have_execfd) in create_elf_fdpic_tables() 642 NEW_AUX_ENT(AT_EXECFN, bprm->exec); in create_elf_fdpic_tables() 649 if (bprm->have_execfd) in create_elf_fdpic_tables() 650 NEW_AUX_ENT(AT_EXECFD, bprm->execfd); in create_elf_fdpic_tables() 682 current->mm->arg_start = bprm->p; in create_elf_fdpic_tables() [all …]
|
| A D | binfmt_elf.c | 161 unsigned long p = bprm->p; in create_elf_tables() 162 int argc = bprm->argc; in create_elf_tables() 163 int envc = bprm->envc; in create_elf_tables() 270 if (bprm->have_execfd) { in create_elf_tables() 852 if (!bprm->file->f_op->mmap) in load_elf_binary() 903 would_dump(bprm, interpreter); in load_elf_binary() 936 bprm->file, false, in load_elf_binary() 996 retval = begin_new_exec(bprm); in load_elf_binary() 1010 setup_new_exec(bprm); in load_elf_binary() 1286 mm->start_stack = bprm->p; in load_elf_binary() [all …]
|
| A D | compat_binfmt_elf.c | 114 #define COMPAT_ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) \ argument 115 compat_arch_setup_additional_pages(bprm, interpreter)
|
| /linux/security/apparmor/ |
| A D | domain.c | 321 d = bprm->file->f_path.dentry; in aa_xattrs_match() 647 AA_BUG(!bprm); in profile_transition() 659 name = bprm->filename; in profile_transition() 748 AA_BUG(!bprm); in profile_onexec() 769 xname = bprm->filename; in profile_onexec() 822 AA_BUG(!bprm); in handle_onexec() 884 file_inode(bprm->file)); in apparmor_bprm_creds_for_exec() 887 file_inode(bprm->file)->i_mode in apparmor_bprm_creds_for_exec() 892 AA_BUG(!cred_label(bprm->cred)); in apparmor_bprm_creds_for_exec() 965 "label=", bprm->filename); in apparmor_bprm_creds_for_exec() [all …]
|
| /linux/include/linux/ |
| A D | binfmts.h | 119 extern int begin_new_exec(struct linux_binprm * bprm); 120 extern void setup_new_exec(struct linux_binprm * bprm); 121 extern void finalize_exec(struct linux_binprm *bprm); 131 extern int setup_arg_pages(struct linux_binprm * bprm, 134 extern int transfer_args_to_stack(struct linux_binprm *bprm, 136 extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm); 137 int copy_string_kernel(const char *arg, struct linux_binprm *bprm);
|
| A D | audit.h | 406 extern void __audit_bprm(struct linux_binprm *bprm); 414 extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, 442 static inline void audit_bprm(struct linux_binprm *bprm) in audit_bprm() argument 445 __audit_bprm(bprm); in audit_bprm() 494 static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, in audit_log_bprm_fcaps() argument 499 return __audit_log_bprm_fcaps(bprm, new, old); in audit_log_bprm_fcaps() 636 static inline void audit_bprm(struct linux_binprm *bprm) in audit_bprm() argument 665 static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, in audit_log_bprm_fcaps() argument
|
| A D | elf.h | 31 #define ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) \ argument 32 arch_setup_additional_pages(bprm, interpreter)
|
| /linux/tools/testing/selftests/bpf/progs/ |
| A D | ima.c | 67 void BPF_PROG(bprm_committed_creds, struct linux_binprm *bprm) in BPF_PROG() argument 69 ima_test_common(bprm->file); in BPF_PROG() 73 int BPF_PROG(bprm_creds_for_exec, struct linux_binprm *bprm) in BPF_PROG() argument 78 ima_test_common(bprm->file); in BPF_PROG()
|
| A D | bprm_opts.c | 22 int BPF_PROG(secure_exec, struct linux_binprm *bprm) in BPF_PROG() argument 31 bpf_bprm_opts_set(bprm, BPF_F_BPRM_SECUREEXEC); in BPF_PROG()
|
| A D | local_storage.c | 208 void BPF_PROG(exec, struct linux_binprm *bprm) in BPF_PROG() argument 220 storage->exec_inode = bprm->file->f_inode; in BPF_PROG() 222 storage = bpf_inode_storage_get(&inode_storage_map, bprm->file->f_inode, in BPF_PROG()
|
| A D | lsm.c | 110 int BPF_PROG(test_void_hook, struct linux_binprm *bprm) in BPF_PROG() argument 121 bpf_copy_from_user(args, sizeof(args), (void *)bprm->vma->vm_mm->arg_start); in BPF_PROG() 122 bpf_copy_from_user(args, sizeof(args), (void *)bprm->mm->arg_start); in BPF_PROG()
|
| A D | verifier_const.c | 92 int BPF_PROG(bprm, struct linux_binprm *bprm) in BPF_PROG() argument
|
| /linux/security/tomoyo/ |
| A D | audit.c | 22 static char *tomoyo_print_bprm(struct linux_binprm *bprm, in tomoyo_print_bprm() argument 30 unsigned long pos = bprm->p; in tomoyo_print_bprm() 32 int argv_count = bprm->argc; in tomoyo_print_bprm() 33 int envp_count = bprm->envc; in tomoyo_print_bprm() 46 if (!tomoyo_dump_page(bprm, pos, dump)) in tomoyo_print_bprm() 261 struct file *file = r->ee->bprm->file; in tomoyo_init_log() 264 bprm_info = tomoyo_print_bprm(r->ee->bprm, &r->ee->dump); in tomoyo_init_log() 281 struct linux_binprm *bprm = r->ee->bprm; in tomoyo_init_log() local 285 realpath, bprm->argc, bprm->envc, bprm_info); in tomoyo_init_log()
|
| A D | domain.c | 616 struct linux_binprm *bprm = ee->bprm; in tomoyo_environ() local 621 unsigned long pos = bprm->p; in tomoyo_environ() 623 int argv_count = bprm->argc; in tomoyo_environ() 624 int envp_count = bprm->envc; in tomoyo_environ() 637 if (!tomoyo_dump_page(bprm, pos, &env_page)) in tomoyo_environ() 705 const char *original_name = bprm->filename; in tomoyo_find_next_domain() 722 ee->bprm = bprm; in tomoyo_find_next_domain() 724 ee->obj.path1 = bprm->file->f_path; in tomoyo_find_next_domain() 919 mmap_read_lock(bprm->mm); in tomoyo_dump_page() 922 mmap_read_unlock(bprm->mm); in tomoyo_dump_page() [all …]
|
| A D | condition.c | 109 struct linux_binprm *bprm = ee->bprm; in tomoyo_scan_bprm() local 113 unsigned long pos = bprm->p; in tomoyo_scan_bprm() 115 int argv_count = bprm->argc; in tomoyo_scan_bprm() 116 int envp_count = bprm->envc; in tomoyo_scan_bprm() 780 struct linux_binprm *bprm = NULL; in tomoyo_condition() local 789 bprm = r->ee->bprm; in tomoyo_condition() 790 if (!bprm && (argc || envc)) in tomoyo_condition() 928 if (!bprm) in tomoyo_condition() 930 value = bprm->argc; in tomoyo_condition() 933 if (!bprm) in tomoyo_condition() [all …]
|
| A D | tomoyo.c | 56 static void tomoyo_bprm_committed_creds(const struct linux_binprm *bprm) in tomoyo_bprm_committed_creds() argument 73 static int tomoyo_bprm_creds_for_exec(struct linux_binprm *bprm) in tomoyo_bprm_creds_for_exec() argument 80 tomoyo_load_policy(bprm->filename); in tomoyo_bprm_creds_for_exec() 92 static int tomoyo_bprm_check_security(struct linux_binprm *bprm) in tomoyo_bprm_check_security() argument 102 const int err = tomoyo_find_next_domain(bprm); in tomoyo_bprm_check_security() 111 &bprm->file->f_path, O_RDONLY); in tomoyo_bprm_check_security()
|
| /linux/security/ |
| A D | commoncap.c | 588 struct linux_binprm *bprm, in bprm_caps_from_vfs_caps() argument 592 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps() 730 cap_clear(bprm->cred->cap_permitted); in get_file_caps() 751 bprm->filename); in get_file_caps() 761 cap_clear(bprm->cred->cap_permitted); in get_file_caps() 793 struct cred *new = bprm->cred; in handle_privileged_root() 890 struct cred *new = bprm->cred; in cap_bprm_creds_from_file() 908 bprm->per_clear |= PER_CLEAR_ON_SETID; in cap_bprm_creds_from_file() 918 ((bprm->unsafe & ~LSM_UNSAFE_PTRACE) || in cap_bprm_creds_from_file() 956 ret = audit_log_bprm_fcaps(bprm, new, old); in cap_bprm_creds_from_file() [all …]
|
| /linux/arch/riscv/kernel/ |
| A D | vdso.c | 210 struct linux_binprm *bprm, in __setup_additional_pages() argument 253 int compat_arch_setup_additional_pages(struct linux_binprm *bprm, in compat_arch_setup_additional_pages() argument 262 ret = __setup_additional_pages(mm, bprm, uses_interp, in compat_arch_setup_additional_pages() 270 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) in arch_setup_additional_pages() argument 278 ret = __setup_additional_pages(mm, bprm, uses_interp, &vdso_info); in arch_setup_additional_pages()
|
| /linux/fs/tests/ |
| A D | exec_kunit.c | 5 struct linux_binprm bprm; member 120 struct linux_binprm bprm = result->bprm; in exec_test_bprm_stack_limits() local 123 rc = bprm_stack_limits(&bprm); in exec_test_bprm_stack_limits() 126 KUNIT_EXPECT_EQ_MSG(test, bprm.argmin, result->expected_argmin, "on loop %d", i); in exec_test_bprm_stack_limits()
|
| /linux/arch/arm64/kernel/ |
| A D | vdso.c | 181 struct linux_binprm *bprm, in __setup_additional_pages() argument 379 int aarch32_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) in aarch32_setup_additional_pages() argument 392 ret = __setup_additional_pages(VDSO_ABI_AA32, mm, bprm, in aarch32_setup_additional_pages() 430 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) in arch_setup_additional_pages() argument 438 ret = __setup_additional_pages(VDSO_ABI_AA64, mm, bprm, uses_interp); in arch_setup_additional_pages()
|
| /linux/arch/x86/include/asm/ |
| A D | elf.h | 372 extern int arch_setup_additional_pages(struct linux_binprm *bprm, 374 extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm, 376 #define COMPAT_ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) \ argument 377 compat_arch_setup_additional_pages(bprm, interpreter, \
|