Home
last modified time | relevance | path

Searched refs:bprm (Results 1 – 25 of 65) sorted by relevance

123

/linux-6.3-rc2/fs/
A Dexec.c509 bprm->argmin = bprm->p - limit; in bprm_stack_limits()
549 if (bprm->p < bprm->argmin) in copy_strings()
1285 would_dump(bprm, bprm->file); in begin_new_exec()
1287 would_dump(bprm, bprm->executable); in begin_new_exec()
1503 if (bprm->interp != bprm->filename) in free_bprm()
1527 bprm->filename = bprm->fdpath; in alloc_bprm()
1529 bprm->interp = bprm->filename; in alloc_bprm()
1545 if (bprm->interp != bprm->filename) in bprm_change_interp()
1785 bprm->file = bprm->interpreter; in exec_binprm()
1937 bprm->exec = bprm->p; in do_execveat_common()
[all …]
A Dbinfmt_script.c41 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 Dbinfmt_flat.c115 sp -= bprm->envc + 1; in create_flat_tables()
116 sp -= bprm->argc + 1; in create_flat_tables()
124 if (put_user(bprm->argc, sp++)) in create_flat_tables()
135 for (i = bprm->argc; i > 0; i--) { in create_flat_tables()
148 for (i = bprm->envc; i > 0; i--) { in create_flat_tables()
507 ret = begin_new_exec(bprm); in load_flat_file()
513 setup_new_exec(bprm); in load_flat_file()
675 result = read_code(bprm->file, datapos, in load_flat_file()
714 "Load", bprm->filename, in load_flat_file()
902 res = create_flat_tables(bprm, bprm->p); in load_flat_binary()
[all …]
A Dbinfmt_misc.c90 static Node *check_file(struct linux_binprm *bprm) in check_file() argument
92 char *p = strrchr(bprm->interp, '.'); in check_file()
113 s = bprm->buf + e->offset; in check_file()
144 fmt = check_file(bprm); in load_misc_binary()
159 retval = remove_arg_zero(bprm); in load_misc_binary()
165 bprm->have_execfd = 1; in load_misc_binary()
168 retval = copy_string_kernel(bprm->interp, bprm); in load_misc_binary()
171 bprm->argc++; in load_misc_binary()
177 bprm->argc++; in load_misc_binary()
195 bprm->interpreter = interp_file; in load_misc_binary()
[all …]
A Dbinfmt_elf_fdpic.c274 would_dump(bprm, interpreter); in load_elf_fdpic_binary()
341 retval = begin_new_exec(bprm); in load_elf_fdpic_binary()
355 setup_new_exec(bprm); in load_elf_fdpic_binary()
462 finalize_exec(bprm); in load_elf_fdpic_binary()
518 sp = arch_align_stack(bprm->p); in create_elf_fdpic_tables()
593 if (bprm->have_execfd) in create_elf_fdpic_tables()
635 if (bprm->have_execfd) { in create_elf_fdpic_tables()
638 NEW_AUX_ENT(AT_EXECFD, bprm->execfd); in create_elf_fdpic_tables()
662 NEW_AUX_ENT(AT_EXECFN, bprm->exec); in create_elf_fdpic_tables()
690 current->mm->arg_start = bprm->p; in create_elf_fdpic_tables()
[all …]
A Dbinfmt_elf.c180 unsigned long p = bprm->p; in create_elf_tables()
181 int argc = bprm->argc; in create_elf_tables()
182 int envc = bprm->envc; in create_elf_tables()
289 if (bprm->have_execfd) { in create_elf_tables()
857 if (!bprm->file->f_op->mmap) in load_elf_binary()
908 would_dump(bprm, interpreter); in load_elf_binary()
941 bprm->file, false, in load_elf_binary()
1001 retval = begin_new_exec(bprm); in load_elf_binary()
1014 setup_new_exec(bprm); in load_elf_binary()
1301 mm->start_stack = bprm->p; in load_elf_binary()
[all …]
A Dcompat_binfmt_elf.c114 #define COMPAT_ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) \ argument
115 compat_arch_setup_additional_pages(bprm, interpreter)
/linux-6.3-rc2/security/apparmor/
A Ddomain.c313 d = bprm->file->f_path.dentry; in aa_xattrs_match()
637 AA_BUG(!bprm); in profile_transition()
649 name = bprm->filename; in profile_transition()
736 AA_BUG(!bprm); in profile_onexec()
757 xname = bprm->filename; in profile_onexec()
808 AA_BUG(!bprm); in handle_onexec()
866 file_inode(bprm->file)); in apparmor_bprm_creds_for_exec()
869 file_inode(bprm->file)->i_mode in apparmor_bprm_creds_for_exec()
873 AA_BUG(!cred_label(bprm->cred)); in apparmor_bprm_creds_for_exec()
945 "label=", bprm->filename); in apparmor_bprm_creds_for_exec()
[all …]
/linux-6.3-rc2/include/linux/
A Dbinfmts.h109 extern int begin_new_exec(struct linux_binprm * bprm);
110 extern void setup_new_exec(struct linux_binprm * bprm);
111 extern void finalize_exec(struct linux_binprm *bprm);
121 extern int setup_arg_pages(struct linux_binprm * bprm,
124 extern int transfer_args_to_stack(struct linux_binprm *bprm,
126 extern int bprm_change_interp(const char *interp, struct linux_binprm *bprm);
127 int copy_string_kernel(const char *arg, struct linux_binprm *bprm);
A Daudit.h405 extern void __audit_bprm(struct linux_binprm *bprm);
413 extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
441 static inline void audit_bprm(struct linux_binprm *bprm) in audit_bprm() argument
444 __audit_bprm(bprm); in audit_bprm()
493 static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, in audit_log_bprm_fcaps() argument
498 return __audit_log_bprm_fcaps(bprm, new, old); in audit_log_bprm_fcaps()
635 static inline void audit_bprm(struct linux_binprm *bprm) in audit_bprm() argument
664 static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm, in audit_log_bprm_fcaps() argument
A Delf.h31 #define ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) \ argument
32 arch_setup_additional_pages(bprm, interpreter)
/linux-6.3-rc2/tools/testing/selftests/bpf/progs/
A Dima.c67 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 Dbprm_opts.c22 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 Dlocal_storage.c168 void BPF_PROG(exec, struct linux_binprm *bprm) in BPF_PROG() argument
180 storage->exec_inode = bprm->file->f_inode; in BPF_PROG()
182 storage = bpf_inode_storage_get(&inode_storage_map, bprm->file->f_inode, in BPF_PROG()
A Dlsm.c110 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()
/linux-6.3-rc2/security/tomoyo/
A Daudit.c22 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 Ddomain.c616 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()
917 mmap_read_lock(bprm->mm); in tomoyo_dump_page()
920 mmap_read_unlock(bprm->mm); in tomoyo_dump_page()
[all …]
A Dcondition.c109 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 Dtomoyo.c55 static void tomoyo_bprm_committed_creds(struct linux_binprm *bprm) in tomoyo_bprm_committed_creds() argument
72 static int tomoyo_bprm_creds_for_exec(struct linux_binprm *bprm) in tomoyo_bprm_creds_for_exec() argument
79 tomoyo_load_policy(bprm->filename); in tomoyo_bprm_creds_for_exec()
91 static int tomoyo_bprm_check_security(struct linux_binprm *bprm) in tomoyo_bprm_check_security() argument
101 const int err = tomoyo_find_next_domain(bprm); in tomoyo_bprm_check_security()
110 &bprm->file->f_path, O_RDONLY); in tomoyo_bprm_check_security()
/linux-6.3-rc2/security/
A Dcommoncap.c587 struct linux_binprm *bprm, in bprm_caps_from_vfs_caps() argument
591 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps()
729 cap_clear(bprm->cred->cap_permitted); in get_file_caps()
750 bprm->filename); in get_file_caps()
760 cap_clear(bprm->cred->cap_permitted); in get_file_caps()
792 struct cred *new = bprm->cred; in handle_privileged_root()
889 struct cred *new = bprm->cred; in cap_bprm_creds_from_file()
907 bprm->per_clear |= PER_CLEAR_ON_SETID; in cap_bprm_creds_from_file()
917 ((bprm->unsafe & ~LSM_UNSAFE_PTRACE) || in cap_bprm_creds_from_file()
955 ret = audit_log_bprm_fcaps(bprm, new, old); in cap_bprm_creds_from_file()
[all …]
/linux-6.3-rc2/arch/riscv/kernel/
A Dvdso.c221 struct linux_binprm *bprm, in __setup_additional_pages() argument
264 int compat_arch_setup_additional_pages(struct linux_binprm *bprm, in compat_arch_setup_additional_pages() argument
273 ret = __setup_additional_pages(mm, bprm, uses_interp, in compat_arch_setup_additional_pages()
281 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) in arch_setup_additional_pages() argument
289 ret = __setup_additional_pages(mm, bprm, uses_interp, &vdso_info); in arch_setup_additional_pages()
/linux-6.3-rc2/arch/arm64/kernel/
A Dvdso.c190 struct linux_binprm *bprm, in __setup_additional_pages() argument
388 int aarch32_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) in aarch32_setup_additional_pages() argument
401 ret = __setup_additional_pages(VDSO_ABI_AA32, mm, bprm, in aarch32_setup_additional_pages()
439 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) in arch_setup_additional_pages() argument
447 ret = __setup_additional_pages(VDSO_ABI_AA64, mm, bprm, uses_interp); in arch_setup_additional_pages()
/linux-6.3-rc2/arch/x86/include/asm/
A Delf.h371 extern int arch_setup_additional_pages(struct linux_binprm *bprm,
373 extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
375 #define COMPAT_ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) \ argument
376 compat_arch_setup_additional_pages(bprm, interpreter, \
/linux-6.3-rc2/arch/riscv/include/asm/
A Delf.h111 extern int arch_setup_additional_pages(struct linux_binprm *bprm,
139 extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
/linux-6.3-rc2/arch/arm64/include/asm/
A Delf.h186 extern int arch_setup_additional_pages(struct linux_binprm *bprm,
243 extern int aarch32_setup_additional_pages(struct linux_binprm *bprm,

Completed in 40 milliseconds

123