Lines Matching refs:bprm
106 static int create_flat_tables(struct linux_binprm *bprm, unsigned long arg_start)
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,
201 ret = kernel_read(bprm->file, buf, LBUFSIZE, &fpos);
271 ret = kernel_read(bprm->file, buf, LBUFSIZE, &fpos);
404 static int load_flat_file(struct linux_binprm *bprm,
419 hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */
447 pr_info("Loading file: %s\n", bprm->filename);
507 ret = begin_new_exec(bprm);
513 setup_new_exec(bprm);
533 textpos = vm_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC,
568 result = decompress_exec(bprm, fpos, (char *)datapos,
573 result = read_code(bprm->file, datapos, fpos,
620 result = decompress_exec(bprm, sizeof(struct flat_hdr),
638 result = decompress_exec(bprm, sizeof(struct flat_hdr),
650 result = read_code(bprm->file, textpos, 0, text_len);
653 result = decompress_exec(bprm, text_len, (char *) datapos,
660 result = decompress_exec(bprm, text_len,
673 result = read_code(bprm->file, textpos, 0, text_len);
675 result = read_code(bprm->file, datapos,
714 "Load", bprm->filename,
853 static int load_flat_binary(struct linux_binprm *bprm)
872 stack_len += PAGE_SIZE * MAX_ARG_PAGES - bprm->p; /* the strings */
874 stack_len += (bprm->argc + 1) * sizeof(char *); /* the argv array */
875 stack_len += (bprm->envc + 1) * sizeof(char *); /* the envp array */
878 res = load_flat_file(bprm, &libinfo, &stack_len);
900 res = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT);
902 res = create_flat_tables(bprm, bprm->p);
910 res = transfer_args_to_stack(bprm, ¤t->mm->start_stack);
912 res = create_flat_tables(bprm, current->mm->start_stack);
927 finalize_exec(bprm);