• Home
  • Raw
  • Download

Lines Matching refs:bprm

123 static int create_flat_tables(struct linux_binprm *bprm, unsigned long arg_start)  in create_flat_tables()  argument
132 sp -= bprm->envc + 1; in create_flat_tables()
133 sp -= bprm->argc + 1; in create_flat_tables()
141 __put_user(bprm->argc, sp++); in create_flat_tables()
145 envp = (unsigned long)(sp + 2 + bprm->argc + 1); in create_flat_tables()
151 for (i = bprm->argc; i > 0; i--) { in create_flat_tables()
162 for (i = bprm->envc; i > 0; i--) { in create_flat_tables()
192 static int decompress_exec(struct linux_binprm *bprm, loff_t fpos, char *dst, in decompress_exec() argument
213 ret = kernel_read(bprm->file, buf, LBUFSIZE, &fpos); in decompress_exec()
283 ret = kernel_read(bprm->file, buf, LBUFSIZE, &fpos); in decompress_exec()
425 static int load_flat_file(struct linux_binprm *bprm, in load_flat_file() argument
440 hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */ in load_flat_file()
468 pr_info("Loading file: %s\n", bprm->filename); in load_flat_file()
537 ret = flush_old_exec(bprm); in load_flat_file()
543 setup_new_exec(bprm); in load_flat_file()
564 textpos = vm_mmap(bprm->file, 0, text_len, PROT_READ|PROT_EXEC, in load_flat_file()
596 result = decompress_exec(bprm, fpos, (char *)datapos, in load_flat_file()
601 result = read_code(bprm->file, datapos, fpos, in load_flat_file()
645 result = decompress_exec(bprm, sizeof(struct flat_hdr), in load_flat_file()
664 result = decompress_exec(bprm, sizeof(struct flat_hdr), in load_flat_file()
676 result = read_code(bprm->file, textpos, 0, text_len); in load_flat_file()
679 result = decompress_exec(bprm, text_len, (char *) datapos, in load_flat_file()
686 result = decompress_exec(bprm, text_len, in load_flat_file()
699 result = read_code(bprm->file, textpos, 0, text_len); in load_flat_file()
701 result = read_code(bprm->file, datapos, in load_flat_file()
741 id ? "Lib" : "Load", bprm->filename, in load_flat_file()
886 struct linux_binprm bprm; in load_flat_shared_library() local
891 memset(&bprm, 0, sizeof(bprm)); in load_flat_shared_library()
897 bprm.filename = buf; in load_flat_shared_library()
898 bprm.file = open_exec(bprm.filename); in load_flat_shared_library()
899 res = PTR_ERR(bprm.file); in load_flat_shared_library()
900 if (IS_ERR(bprm.file)) in load_flat_shared_library()
903 res = kernel_read(bprm.file, bprm.buf, BINPRM_BUF_SIZE, &pos); in load_flat_shared_library()
906 res = load_flat_file(&bprm, libs, id, NULL); in load_flat_shared_library()
908 allow_write_access(bprm.file); in load_flat_shared_library()
909 fput(bprm.file); in load_flat_shared_library()
922 static int load_flat_binary(struct linux_binprm *bprm) in load_flat_binary() argument
941 stack_len += PAGE_SIZE * MAX_ARG_PAGES - bprm->p; /* the strings */ in load_flat_binary()
943 stack_len += (bprm->argc + 1) * sizeof(char *); /* the argv array */ in load_flat_binary()
944 stack_len += (bprm->envc + 1) * sizeof(char *); /* the envp array */ in load_flat_binary()
947 res = load_flat_file(bprm, &libinfo, 0, &stack_len); in load_flat_binary()
966 install_exec_creds(bprm); in load_flat_binary()
971 res = setup_arg_pages(bprm, STACK_TOP, EXSTACK_DEFAULT); in load_flat_binary()
973 res = create_flat_tables(bprm, bprm->p); in load_flat_binary()
981 res = transfer_args_to_stack(bprm, &current->mm->start_stack); in load_flat_binary()
983 res = create_flat_tables(bprm, current->mm->start_stack); in load_flat_binary()
1011 finalize_exec(bprm); in load_flat_binary()