/linux-2.4.37.9/fs/ |
D | binfmt_script.c | 17 static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) in load_script() argument 24 if ((bprm->buf[0] != '#') || (bprm->buf[1] != '!') || (bprm->sh_bang)) in load_script() 31 bprm->sh_bang++; in load_script() 32 allow_write_access(bprm->file); in load_script() 33 fput(bprm->file); in load_script() 34 bprm->file = NULL; in load_script() 36 bprm->buf[BINPRM_BUF_SIZE - 1] = '\0'; in load_script() 37 if ((cp = strchr(bprm->buf, '\n')) == NULL) in load_script() 38 cp = bprm->buf+BINPRM_BUF_SIZE-1; in load_script() 40 while (cp > bprm->buf) { in load_script() [all …]
|
D | exec.c | 188 int copy_strings(int argc,char ** argv, struct linux_binprm *bprm) in copy_strings() argument 200 !(len = strnlen_user(str, bprm->p))) { in copy_strings() 205 if (bprm->p < len) { in copy_strings() 210 bprm->p -= len; in copy_strings() 212 pos = bprm->p; in copy_strings() 221 page = bprm->page[i]; in copy_strings() 225 bprm->page[i] = page; in copy_strings() 269 int copy_strings_kernel(int argc,char ** argv, struct linux_binprm *bprm) in copy_strings_kernel() argument 274 r = copy_strings(argc, argv, bprm); in copy_strings_kernel() 326 int setup_arg_pages(struct linux_binprm *bprm) in setup_arg_pages() argument [all …]
|
D | binfmt_em86.c | 26 static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) in load_em86() argument 34 elf_ex = *((struct elfhdr *)bprm->buf); in load_em86() 42 (!bprm->file->f_op || !bprm->file->f_op->mmap)) { in load_em86() 46 bprm->sh_bang++; /* Well, the bang-shell is implicit... */ in load_em86() 47 allow_write_access(bprm->file); in load_em86() 48 fput(bprm->file); in load_em86() 49 bprm->file = NULL; in load_em86() 66 remove_arg_zero(bprm); in load_em86() 67 retval = copy_strings_kernel(1, &bprm->filename, bprm); in load_em86() 69 bprm->argc++; in load_em86() [all …]
|
D | binfmt_som.c | 39 static int load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs); 65 static void create_som_tables(struct linux_binprm *bprm) in create_som_tables() argument 68 int argc = bprm->argc; in create_som_tables() 69 int envc = bprm->envc; in create_som_tables() 74 sp = (unsigned long *)((bprm->p + 3) & ~3); in create_som_tables() 86 bprm->p = (unsigned long) sp; in create_som_tables() 186 do_load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs) in do_load_som_binary() argument 196 som_ex = (struct som_hdr *) bprm->buf; in do_load_som_binary() 212 retval = kernel_read(bprm->file, som_ex->aux_header_location, in do_load_som_binary() 220 get_file(bprm->file); in do_load_som_binary() [all …]
|
D | binfmt_aout.c | 200 static unsigned long * create_aout_tables(char * p, struct linux_binprm * bprm) in create_aout_tables() argument 204 int argc = bprm->argc; in create_aout_tables() 205 int envc = bprm->envc; in create_aout_tables() 217 if (bprm->loader) { in create_aout_tables() 220 put_user(bprm->loader, --sp); in create_aout_tables() 223 put_user(bprm->exec, --sp); in create_aout_tables() 262 static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) in load_aout_binary() argument 270 ex = *((struct exec *) bprm->buf); /* exec-header */ in load_aout_binary() 274 bprm->file->f_dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { in load_aout_binary() 291 retval = flush_old_exec(bprm); in load_aout_binary() [all …]
|
D | binfmt_misc.c | 58 static Node *check_file(struct linux_binprm *bprm) in check_file() argument 60 char *p = strrchr(bprm->filename, '.'); in check_file() 77 s = bprm->buf + e->offset; in check_file() 96 static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) in load_misc_binary() argument 110 fmt = check_file(bprm); in load_misc_binary() 119 allow_write_access(bprm->file); in load_misc_binary() 120 fput(bprm->file); in load_misc_binary() 121 bprm->file = NULL; in load_misc_binary() 124 remove_arg_zero(bprm); in load_misc_binary() 125 retval = copy_strings_kernel(1, &bprm->filename, bprm); in load_misc_binary() [all …]
|
D | binfmt_elf.c | 45 static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs); 465 static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) in load_elf_binary() argument 489 elf_ex = *((struct elfhdr *) bprm->buf); in load_elf_binary() 500 if (!bprm->file->f_op||!bprm->file->f_op->mmap) in load_elf_binary() 516 retval = kernel_read(bprm->file, elf_ex.e_phoff, (char *) elf_phdata, size); in load_elf_binary() 538 get_file(bprm->file); in load_elf_binary() 539 fd_install(elf_exec_fileno = retval, bprm->file); in load_elf_binary() 568 retval = kernel_read(bprm->file, elf_ppnt->p_offset, in load_elf_binary() 598 retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE); in load_elf_binary() 606 interp_ex = *((struct exec *) bprm->buf); in load_elf_binary() [all …]
|
/linux-2.4.37.9/arch/s390x/kernel/ |
D | exec32.c | 40 int setup_arg_pages32(struct linux_binprm *bprm) in setup_arg_pages32() argument 48 bprm->p += stack_base; in setup_arg_pages32() 49 if (bprm->loader) in setup_arg_pages32() 50 bprm->loader += stack_base; in setup_arg_pages32() 51 bprm->exec += stack_base; in setup_arg_pages32() 60 mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; in setup_arg_pages32() 77 struct page *page = bprm->page[i]; in setup_arg_pages32() 79 bprm->page[i] = NULL; in setup_arg_pages32()
|
D | binfmt_elf32.c | 118 int setup_arg_pages32(struct linux_binprm *bprm); 183 #define setup_arg_pages(bprm) setup_arg_pages32(bprm) argument
|
D | linux32.c | 3159 static int copy_strings32(int argc, u32 * argv, struct linux_binprm *bprm) in copy_strings32() argument 3168 !(len = strnlen_user((char *)A(str), bprm->p))) in copy_strings32() 3171 if (bprm->p < len) in copy_strings32() 3174 bprm->p -= len; in copy_strings32() 3176 pos = bprm->p; in copy_strings32() 3183 page = bprm->page[pos / PAGE_SIZE]; in copy_strings32() 3187 bprm->page[pos / PAGE_SIZE] = page; in copy_strings32() 3226 struct linux_binprm bprm; in do_execve32() local 3231 bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *); in do_execve32() 3232 memset(bprm.page, 0, MAX_ARG_PAGES * sizeof(bprm.page[0])); in do_execve32() [all …]
|
/linux-2.4.37.9/arch/sparc64/kernel/ |
D | binfmt_aout32.c | 154 static u32 *create_aout32_tables(char * p, struct linux_binprm * bprm) in create_aout32_tables() argument 158 int argc = bprm->argc; in create_aout32_tables() 159 int envc = bprm->envc; in create_aout32_tables() 200 static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs) in load_aout32_binary() argument 209 ex = *((struct exec *) bprm->buf); /* exec-header */ in load_aout32_binary() 213 bprm->file->f_dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { in load_aout32_binary() 230 retval = flush_old_exec(bprm); in load_aout32_binary() 246 compute_creds(bprm); in load_aout32_binary() 254 bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex), in load_aout32_binary() 259 bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex), in load_aout32_binary() [all …]
|
D | sys_sparc32.c | 3207 static int copy_strings32(int argc, u32 * argv, struct linux_binprm *bprm) in copy_strings32() argument 3216 !(len = strnlen_user((char *)A(str), bprm->p))) in copy_strings32() 3219 if (bprm->p < len) in copy_strings32() 3222 bprm->p -= len; in copy_strings32() 3224 pos = bprm->p; in copy_strings32() 3231 page = bprm->page[pos / PAGE_SIZE]; in copy_strings32() 3235 bprm->page[pos / PAGE_SIZE] = page; in copy_strings32() 3273 struct linux_binprm bprm; in do_execve32() local 3278 bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *); in do_execve32() 3279 memset(bprm.page, 0, MAX_ARG_PAGES * sizeof(bprm.page[0])); in do_execve32() [all …]
|
/linux-2.4.37.9/arch/ia64/ia32/ |
D | binfmt_elf32.c | 50 #define setup_arg_pages(bprm) ia32_setup_arg_pages(bprm) argument 171 ia32_setup_arg_pages (struct linux_binprm *bprm) in ia32_setup_arg_pages() argument 179 bprm->p += stack_base; in ia32_setup_arg_pages() 180 if (bprm->loader) in ia32_setup_arg_pages() 181 bprm->loader += stack_base; in ia32_setup_arg_pages() 182 bprm->exec += stack_base; in ia32_setup_arg_pages() 191 mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; in ia32_setup_arg_pages() 208 struct page *page = bprm->page[i]; in ia32_setup_arg_pages() 210 bprm->page[i] = NULL; in ia32_setup_arg_pages()
|
/linux-2.4.37.9/arch/x86_64/ia32/ |
D | ia32_binfmt.c | 166 #define setup_arg_pages(bprm) ia32_setup_arg_pages(bprm) argument 196 int ia32_setup_arg_pages(struct linux_binprm *bprm); 224 int ia32_setup_arg_pages(struct linux_binprm *bprm) in ia32_setup_arg_pages() argument 232 bprm->p += stack_base; in ia32_setup_arg_pages() 233 if (bprm->loader) in ia32_setup_arg_pages() 234 bprm->loader += stack_base; in ia32_setup_arg_pages() 235 bprm->exec += stack_base; in ia32_setup_arg_pages() 244 mpnt->vm_start = PAGE_MASK & (unsigned long) bprm->p; in ia32_setup_arg_pages() 262 struct page *page = bprm->page[i]; in ia32_setup_arg_pages() 264 bprm->page[i] = NULL; in ia32_setup_arg_pages()
|
/linux-2.4.37.9/include/linux/ |
D | binfmts.h | 54 extern int flush_old_exec(struct linux_binprm * bprm); 55 extern int setup_arg_pages(struct linux_binprm * bprm); 56 extern int copy_strings(int argc,char ** argv,struct linux_binprm *bprm); 57 extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
|
/linux-2.4.37.9/arch/mips/kernel/ |
D | irixelf.c | 44 static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs); 396 static int verify_binary(struct elfhdr *ehp, struct linux_binprm *bprm) in verify_binary() argument 403 !irix_elf_check_arch(ehp) || !bprm->file->f_op->mmap) { in verify_binary() 432 struct linux_binprm *bprm, int pnum) in look_for_irix_interpreter() argument 454 retval = kernel_read(bprm->file, epp->p_offset, (*name + 16), in look_for_irix_interpreter() 464 retval = kernel_read(file, 0, bprm->buf, 128); in look_for_irix_interpreter() 468 *interp_elf_ex = *(struct elfhdr *) bprm->buf; in look_for_irix_interpreter() 595 static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs) in load_irix_binary() argument 610 elf_ex = *((struct elfhdr *) bprm->buf); in load_irix_binary() 613 if (verify_binary(&elf_ex, bprm)) in load_irix_binary() [all …]
|
/linux-2.4.37.9/arch/parisc/kernel/ |
D | sys_parisc32.c | 107 static int copy_strings32(int argc, u32 *argv, struct linux_binprm *bprm) in copy_strings32() argument 116 !(len = strnlen_user((char *)A(str), bprm->p))) in copy_strings32() 119 if (bprm->p < len) in copy_strings32() 122 bprm->p -= len; in copy_strings32() 124 pos = bprm->p; in copy_strings32() 133 page = bprm->page[i]; in copy_strings32() 137 bprm->page[i] = page; in copy_strings32() 176 struct linux_binprm bprm; in do_execve32() local 187 bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *); in do_execve32() 188 memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0])); in do_execve32() [all …]
|
/linux-2.4.37.9/arch/mips64/kernel/ |
D | linux32.c | 322 int copy_strings32(int argc, u32 * argv, struct linux_binprm *bprm) 330 !(len = strnlen_user((char *)A(str), bprm->p))) 332 if (bprm->p < len) 335 bprm->p -= len; 338 pos = bprm->p; 347 page = bprm->page[i]; 351 bprm->page[i] = page; 388 struct linux_binprm bprm; 393 bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *); 394 memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0])); [all …]
|
/linux-2.4.37.9/arch/ppc64/kernel/ |
D | sys_ppc32.c | 3871 static int copy_strings32(int argc, u32 * argv, struct linux_binprm *bprm) in copy_strings32() argument 3880 !(len = strnlen_user((char *)A(str), bprm->p))) in copy_strings32() 3883 if (bprm->p < len) in copy_strings32() 3886 bprm->p -= len; in copy_strings32() 3888 pos = bprm->p; in copy_strings32() 3895 page = bprm->page[pos / PAGE_SIZE]; in copy_strings32() 3899 bprm->page[pos / PAGE_SIZE] = page; in copy_strings32() 3937 struct linux_binprm bprm; in do_execve32() local 3942 bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *); in do_execve32() 3943 memset(bprm.page, 0, MAX_ARG_PAGES * sizeof(bprm.page[0])); in do_execve32() [all …]
|
/linux-2.4.37.9/include/asm-parisc/ |
D | processor.h | 264 elf_caddr_t *argv = (elf_caddr_t *)bprm->exec + 1; \
|
/linux-2.4.37.9/include/asm-ia64/ |
D | ia32.h | 528 extern int ia32_setup_arg_pages (struct linux_binprm *bprm);
|