/linux-master/fs/ |
H A D | binfmt_script.c | 34 static int load_script(struct linux_binprm *bprm) argument 41 if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!')) 47 * because bprm->buf is not yet guaranteed to be NUL-terminated 58 buf_end = bprm->buf + sizeof(bprm->buf) - 1; 59 i_end = strnchr(bprm->buf, sizeof(bprm->buf), '\n'); 61 i_end = next_non_spacetab(bprm->buf + 2, buf_end); 77 i_name = next_non_spacetab(bprm [all...] |
H A D | exec.c | 80 static int bprm_creds_from_file(struct linux_binprm *bprm); 181 * The nascent bprm->mm is not visible until exec_mmap() but it can 186 static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) argument 189 long diff = (long)(pages - bprm->vma_pages); 194 bprm->vma_pages = pages; 198 static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, argument 202 struct vm_area_struct *vma = bprm->vma; 203 struct mm_struct *mm = bprm->mm; 234 acct_arg_size(bprm, vma_pages(vma)); 244 static void free_arg_pages(struct linux_binprm *bprm) argument 248 flush_arg_page(struct linux_binprm *bprm, unsigned long pos, struct page *page) argument 254 __bprm_mm_init(struct linux_binprm *bprm) argument 298 valid_arg_len(struct linux_binprm *bprm, long len) argument 305 acct_arg_size(struct linux_binprm *bprm, unsigned long pages) argument 309 get_arg_page(struct linux_binprm *bprm, unsigned long pos, int write) argument 329 free_arg_page(struct linux_binprm *bprm, int i) argument 337 free_arg_pages(struct linux_binprm *bprm) argument 345 flush_arg_page(struct linux_binprm *bprm, unsigned long pos, struct page *page) argument 350 __bprm_mm_init(struct linux_binprm *bprm) argument 356 valid_arg_len(struct linux_binprm *bprm, long len) argument 369 bprm_mm_init(struct linux_binprm *bprm) argument 478 bprm_stack_limits(struct linux_binprm *bprm) argument 524 copy_strings(int argc, struct user_arg_ptr argv, struct linux_binprm *bprm) argument 619 copy_string_kernel(const char *arg, struct linux_binprm *bprm) argument 656 copy_strings_kernel(int argc, const char *const *argv, struct linux_binprm *bprm) argument 750 setup_arg_pages(struct linux_binprm *bprm, unsigned long stack_top, int executable_stack) argument 878 transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *sp_location) argument 1260 begin_new_exec(struct linux_binprm * bprm) argument 1435 would_dump(struct linux_binprm *bprm, struct file *file) argument 1457 setup_new_exec(struct linux_binprm * bprm) argument 1477 finalize_exec(struct linux_binprm *bprm) argument 1492 prepare_bprm_creds(struct linux_binprm *bprm) argument 1514 free_bprm(struct linux_binprm *bprm) argument 1537 struct linux_binprm *bprm; local 1589 bprm_change_interp(const char *interp, struct linux_binprm *bprm) argument 1606 check_unsafe_exec(struct linux_binprm *bprm) argument 1644 bprm_fill_uid(struct linux_binprm *bprm, struct file *file) argument 1693 bprm_creds_from_file(struct linux_binprm *bprm) argument 1708 prepare_binprm(struct linux_binprm *bprm) argument 1721 remove_arg_zero(struct linux_binprm *bprm) argument 1756 search_binary_handler(struct linux_binprm *bprm) argument 1803 exec_binprm(struct linux_binprm *bprm) argument 1848 bprm_execve(struct linux_binprm *bprm) argument 1908 struct linux_binprm *bprm; local 1992 struct linux_binprm *bprm; local [all...] |
H A D | binfmt_flat.c | 106 static int create_flat_tables(struct linux_binprm *bprm, unsigned long arg_start) argument 115 sp -= bprm->envc + 1; 116 sp -= bprm->argc + 1; 124 if (put_user(bprm->argc, sp++)) 129 envp = (unsigned long)(sp + 2 + bprm->argc + 1); 135 for (i = bprm->argc; i > 0; i--) { 148 for (i = bprm->envc; i > 0; i--) { 180 static int decompress_exec(struct linux_binprm *bprm, loff_t fpos, char *dst, argument 201 ret = kernel_read(bprm->file, buf, LBUFSIZE, &fpos); 271 ret = kernel_read(bprm 404 load_flat_file(struct linux_binprm *bprm, struct lib_info *libinfo, unsigned long *extra_stack) argument 853 load_flat_binary(struct linux_binprm *bprm) argument [all...] |
H A D | compat_binfmt_elf.c | 114 #define COMPAT_ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) \ 115 compat_arch_setup_additional_pages(bprm, interpreter)
|
H A D | binfmt_misc.c | 81 * search_binfmt_handler - search for a binary handler for @bprm 83 * @bprm: binary for which we are looking for a handler 85 * Search for a binary type handler for @bprm in the list of registered binary 91 struct linux_binprm *bprm) 93 char *p = strrchr(bprm->interp, '.'); 113 s = bprm->buf + e->offset; 133 * @bprm: binary for which we are looking for a handler 141 struct linux_binprm *bprm) 146 e = search_binfmt_handler(misc, bprm); 202 static int load_misc_binary(struct linux_binprm *bprm) argument 90 search_binfmt_handler(struct binfmt_misc *misc, struct linux_binprm *bprm) argument 140 get_binfmt_handler(struct binfmt_misc *misc, struct linux_binprm *bprm) argument [all...] |
H A D | binfmt_elf_fdpic.c | 182 static int load_elf_fdpic_binary(struct linux_binprm *bprm) argument 205 exec_params.hdr = *(struct elfhdr *) bprm->buf; 210 if (!is_elf(&exec_params.hdr, bprm->file)) 224 retval = elf_fdpic_fetch_phdrs(&exec_params, bprm->file); 247 retval = kernel_read(bprm->file, interpreter_name, 274 would_dump(bprm, interpreter); 277 retval = kernel_read(interpreter, bprm->buf, 285 interp_params.hdr = *((struct elfhdr *) bprm->buf); 341 retval = begin_new_exec(bprm); 354 setup_new_exec(bprm); 496 create_elf_fdpic_tables(struct linux_binprm *bprm, struct mm_struct *mm, struct elf_fdpic_params *exec_params, struct elf_fdpic_params *interp_params) argument [all...] |
H A D | binfmt_elf.c | 69 static int load_elf_binary(struct linux_binprm *bprm); 156 create_elf_tables(struct linux_binprm *bprm, const struct elfhdr *exec, argument 161 unsigned long p = bprm->p; 162 int argc = bprm->argc; 163 int envc = bprm->envc; 248 if (bprm->interp_flags & BINPRM_FLAGS_PRESERVE_ARGV0) 256 NEW_AUX_ENT(AT_SECURE, bprm->secureexec); 261 NEW_AUX_ENT(AT_EXECFN, bprm->exec); 270 if (bprm->have_execfd) { 271 NEW_AUX_ENT(AT_EXECFD, bprm 819 load_elf_binary(struct linux_binprm *bprm) argument [all...] |
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | bprm_opts.c | 22 int BPF_PROG(secure_exec, struct linux_binprm *bprm) argument 31 bpf_bprm_opts_set(bprm, BPF_F_BPRM_SECUREEXEC);
|
H A D | ima.c | 67 void BPF_PROG(bprm_committed_creds, struct linux_binprm *bprm) argument 69 ima_test_common(bprm->file); 73 int BPF_PROG(bprm_creds_for_exec, struct linux_binprm *bprm) argument 78 ima_test_common(bprm->file);
|
H A D | lsm.c | 110 int BPF_PROG(test_void_hook, struct linux_binprm *bprm) argument 121 bpf_copy_from_user(args, sizeof(args), (void *)bprm->vma->vm_mm->arg_start); 122 bpf_copy_from_user(args, sizeof(args), (void *)bprm->mm->arg_start);
|
H A D | local_storage.c | 206 void BPF_PROG(exec, struct linux_binprm *bprm) argument 218 storage->exec_inode = bprm->file->f_inode; 220 storage = bpf_inode_storage_get(&inode_storage_map, bprm->file->f_inode,
|
/linux-master/include/linux/ |
H 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);
|
H A D | elf.h | 31 #define ARCH_SETUP_ADDITIONAL_PAGES(bprm, ex, interpreter) \ 32 arch_setup_additional_pages(bprm, interpreter)
|
/linux-master/security/apparmor/include/ |
H A D | domain.h | 28 int apparmor_bprm_creds_for_exec(struct linux_binprm *bprm);
|
/linux-master/security/apparmor/ |
H A D | domain.c | 300 * @bprm: binprm struct for the process to validate 306 static int aa_xattrs_match(const struct linux_binprm *bprm, argument 315 if (!bprm || !attach->xattr_count) 321 d = bprm->file->f_path.dentry; 370 * @bprm: binprm structure of transitioning task 385 static struct aa_label *find_attach(const struct linux_binprm *bprm, argument 433 if (bprm && attach->xattr_count) { 439 ret = aa_xattrs_match(bprm, profile, 552 * @bprm: binprm structure of transitioning task 563 const struct linux_binprm *bprm, 562 x_to_label(struct aa_profile *profile, const struct linux_binprm *bprm, const char *name, u32 xindex, const char **lookupname, const char **info) argument 631 profile_transition(const struct cred *subj_cred, struct aa_profile *profile, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) argument 733 profile_onexec(const struct cred *subj_cred, struct aa_profile *profile, struct aa_label *onexec, bool stack, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *secure_exec) argument 809 handle_onexec(const struct cred *subj_cred, struct aa_label *label, struct aa_label *onexec, bool stack, const struct linux_binprm *bprm, char *buffer, struct path_cond *cond, bool *unsafe) argument 873 apparmor_bprm_creds_for_exec(struct linux_binprm *bprm) argument [all...] |
/linux-master/security/tomoyo/ |
H A D | domain.c | 616 struct linux_binprm *bprm = ee->bprm; local 621 unsigned long pos = bprm->p; 623 int argv_count = bprm->argc; 624 int envp_count = bprm->envc; 637 if (!tomoyo_dump_page(bprm, pos, &env_page)) 695 * @bprm: Pointer to "struct linux_binprm". 701 int tomoyo_find_next_domain(struct linux_binprm *bprm) argument 705 const char *original_name = bprm->filename; 722 ee->bprm 895 tomoyo_dump_page(struct linux_binprm *bprm, unsigned long pos, struct tomoyo_page_dump *dump) argument [all...] |
H A D | audit.c | 14 * @bprm: Pointer to "struct linux_binprm". 17 * Returns the contents of @bprm on success, NULL otherwise. 22 static char *tomoyo_print_bprm(struct linux_binprm *bprm, argument 30 unsigned long pos = bprm->p; 32 int argv_count = bprm->argc; 33 int envp_count = bprm->envc; 46 if (!tomoyo_dump_page(bprm, pos, dump)) 261 struct file *file = r->ee->bprm->file; 264 bprm_info = tomoyo_print_bprm(r->ee->bprm, &r->ee->dump); 281 struct linux_binprm *bprm local [all...] |
H A D | tomoyo.c | 54 * @bprm: Pointer to "struct linux_binprm". 56 static void tomoyo_bprm_committed_creds(const struct linux_binprm *bprm) argument 69 * @bprm: Pointer to "struct linux_binprm". 73 static int tomoyo_bprm_creds_for_exec(struct linux_binprm *bprm) argument 80 tomoyo_load_policy(bprm->filename); 88 * @bprm: Pointer to "struct linux_binprm". 92 static int tomoyo_bprm_check_security(struct linux_binprm *bprm) argument 102 const int err = tomoyo_find_next_domain(bprm); 111 &bprm->file->f_path, O_RDONLY);
|
H A D | condition.c | 109 struct linux_binprm *bprm = ee->bprm; local 113 unsigned long pos = bprm->p; 115 int argv_count = bprm->argc; 116 int envp_count = bprm->envc; 130 if (!tomoyo_dump_page(bprm, pos, dump)) { 160 if (!tomoyo_argv(bprm->argc - argv_count, 199 * bprm->argv[] are not matched. 211 * in bprm->envp[] are either undefined or not matched. 780 struct linux_binprm *bprm local [all...] |
/linux-master/arch/x86/include/asm/ |
H A D | ia32.h | 63 extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
|
/linux-master/arch/riscv/kernel/ |
H A D | vdso.c | 210 struct linux_binprm *bprm, 253 int compat_arch_setup_additional_pages(struct linux_binprm *bprm, argument 262 ret = __setup_additional_pages(mm, bprm, uses_interp, 270 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) argument 278 ret = __setup_additional_pages(mm, bprm, uses_interp, &vdso_info); 209 __setup_additional_pages(struct mm_struct *mm, struct linux_binprm *bprm, int uses_interp, struct __vdso_info *vdso_info) argument
|
/linux-master/security/ |
H A D | commoncap.c | 588 struct linux_binprm *bprm, 592 struct cred *new = bprm->cred; 724 static int get_file_caps(struct linux_binprm *bprm, const struct file *file, argument 730 cap_clear(bprm->cred->cap_permitted); 751 bprm->filename); 757 rc = bprm_caps_from_vfs_caps(&vcaps, bprm, effective, has_fcap); 761 cap_clear(bprm->cred->cap_permitted); 779 * @bprm: The execution parameters, including the proposed creds 789 static void handle_privileged_root(struct linux_binprm *bprm, bool has_fcap, argument 793 struct cred *new = bprm 587 bprm_caps_from_vfs_caps(struct cpu_vfs_cap_data *caps, struct linux_binprm *bprm, bool *effective, bool *has_fcap) argument 886 cap_bprm_creds_from_file(struct linux_binprm *bprm, const struct file *file) argument [all...] |
/linux-master/arch/riscv/include/asm/ |
H A D | elf.h | 125 extern int arch_setup_additional_pages(struct linux_binprm *bprm, 150 extern int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
|
/linux-master/arch/sh/kernel/vsyscall/ |
H A D | vsyscall.c | 58 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) argument
|
/linux-master/arch/x86/um/vdso/ |
H A D | vma.c | 53 int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) argument
|