taglinefilesource code
bprm51fs/binfmt_elf.cstatic int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs);
bprm335fs/binfmt_elf.cload_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
bprm364fs/binfmt_elf.celf_ex = *((struct elfhdr *) bprm->buf);    /* exec-header */
bprm376fs/binfmt_elf.c(!bprm->inode->i_op || !bprm->inode->i_op->default_file_ops ||
bprm377fs/binfmt_elf.c!bprm->inode->i_op->default_file_ops->mmap)){
bprm387fs/binfmt_elf.cretval = read_exec(bprm->inode, elf_ex.e_phoff, (char *) elf_phdata,
bprm400fs/binfmt_elf.celf_exec_fileno = open_inode(bprm->inode, O_RDONLY);
bprm424fs/binfmt_elf.cretval = read_exec(bprm->inode,elf_ppnt->p_offset,elf_interpreter,
bprm443fs/binfmt_elf.cretval = read_exec(interpreter_inode,0,bprm->buf,128, 1);
bprm446fs/binfmt_elf.cinterp_ex = *((struct exec *) bprm->buf);    /* exec-header */
bprm447fs/binfmt_elf.cinterp_elf_ex = *((struct elfhdr *) bprm->buf);    /* exec-header */
bprm491fs/binfmt_elf.cif (!bprm->sh_bang) {
bprm499fs/binfmt_elf.cbprm->p = copy_strings(1,&passed_p,bprm->page,bprm->p,2);
bprm500fs/binfmt_elf.cbprm->argc++;
bprm503fs/binfmt_elf.cif (!bprm->p) {
bprm514fs/binfmt_elf.cflush_old_exec(bprm);
bprm525fs/binfmt_elf.cbprm->p += setup_arg_pages(0, bprm->page);
bprm526fs/binfmt_elf.ccurrent->mm->start_stack = bprm->p;
bprm615fs/binfmt_elf.ccurrent->executable = bprm->inode;
bprm616fs/binfmt_elf.cbprm->inode->i_count++;
bprm621fs/binfmt_elf.cbprm->p -= MAX_ARG_PAGES*PAGE_SIZE;
bprm622fs/binfmt_elf.cbprm->p = (unsigned long) 
bprm623fs/binfmt_elf.ccreate_elf_tables((char *)bprm->p,
bprm624fs/binfmt_elf.cbprm->argc,
bprm625fs/binfmt_elf.cbprm->envc,
bprm636fs/binfmt_elf.ccurrent->mm->start_stack = bprm->p;
bprm637fs/binfmt_elf.ccurrent->suid = current->euid = current->fsuid = bprm->e_uid;
bprm638fs/binfmt_elf.ccurrent->sgid = current->egid = current->fsgid = bprm->e_gid;
bprm666fs/binfmt_elf.cstart_thread(regs, elf_entry, bprm->p);
bprm298fs/exec.cunsigned long * create_tables(char * p, struct linux_binprm * bprm, int ibcs)
bprm303fs/exec.cint argc = bprm->argc;
bprm304fs/exec.cint envc = bprm->envc;
bprm511fs/exec.cvoid flush_old_exec(struct linux_binprm * bprm)
bprm519fs/exec.cname = bprm->filename;
bprm534fs/exec.cif (bprm->e_uid != current->euid || bprm->e_gid != current->egid || 
bprm535fs/exec.cpermission(bprm->inode,MAY_READ))
bprm559fs/exec.cstruct linux_binprm bprm;
bprm565fs/exec.cbprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
bprm567fs/exec.cbprm.page[i] = 0;
bprm568fs/exec.cretval = open_namei(filename, 0, 0, &bprm.inode, NULL);
bprm571fs/exec.cbprm.filename = filename;
bprm572fs/exec.cbprm.loader = 0;
bprm573fs/exec.cbprm.exec = 0;
bprm574fs/exec.cif ((bprm.argc = count(argv)) < 0)
bprm575fs/exec.creturn bprm.argc;
bprm576fs/exec.cif ((bprm.envc = count(envp)) < 0)
bprm577fs/exec.creturn bprm.envc;
bprm580fs/exec.cif (!S_ISREG(bprm.inode->i_mode)) {  /* must be regular file */
bprm584fs/exec.cif (IS_NOEXEC(bprm.inode)) {    /* FS mustn't be mounted noexec */
bprm588fs/exec.cif (!bprm.inode->i_sb) {
bprm592fs/exec.ci = bprm.inode->i_mode;
bprm593fs/exec.cif (IS_NOSUID(bprm.inode) && (((i & S_ISUID) && bprm.inode->i_uid != current->
bprm594fs/exec.ceuid) || ((i & S_ISGID) && !in_group_p(bprm.inode->i_gid))) && !suser()) {
bprm600fs/exec.cbprm.e_uid = current->euid;
bprm601fs/exec.cbprm.e_gid = current->egid;
bprm603fs/exec.cbprm.e_uid = (i & S_ISUID) ? bprm.inode->i_uid : current->euid;
bprm604fs/exec.cbprm.e_gid = (i & S_ISGID) ? bprm.inode->i_gid : current->egid;
bprm606fs/exec.cif ((retval = permission(bprm.inode, MAY_EXEC)) != 0)
bprm608fs/exec.cif (!(bprm.inode->i_mode & 0111) && fsuser()) {
bprm613fs/exec.cif (bprm.inode->i_wcount > 0) {
bprm617fs/exec.cmemset(bprm.buf,0,sizeof(bprm.buf));
bprm618fs/exec.cretval = read_exec(bprm.inode,0,bprm.buf,128,1);
bprm621fs/exec.cif ((bprm.buf[0] == '#') && (bprm.buf[1] == '!') && (!sh_bang)) {
bprm629fs/exec.ciput(bprm.inode);
bprm630fs/exec.cbprm.buf[127] = '\0';
bprm631fs/exec.cif ((cp = strchr(bprm.buf, '\n')) == NULL)
bprm632fs/exec.ccp = bprm.buf+127;
bprm634fs/exec.cwhile (cp > bprm.buf) {
bprm641fs/exec.cfor (cp = bprm.buf+2; (*cp == ' ') || (*cp == '\t'); cp++);
bprm661fs/exec.cbprm.p = copy_strings(bprm.envc, envp, bprm.page, bprm.p, 0);
bprm662fs/exec.cbprm.p = copy_strings(--bprm.argc, argv+1, bprm.page, bprm.p, 0);
bprm672fs/exec.cbprm.p = copy_strings(1, &bprm.filename, bprm.page, bprm.p, 2);
bprm673fs/exec.cbprm.argc++;
bprm675fs/exec.cbprm.p = copy_strings(1, &i_arg, bprm.page, bprm.p, 2);
bprm676fs/exec.cbprm.argc++;
bprm678fs/exec.cbprm.p = copy_strings(1, &i_name, bprm.page, bprm.p, 2);
bprm679fs/exec.cbprm.argc++;
bprm680fs/exec.cif (!bprm.p) {
bprm689fs/exec.cretval = open_namei(interp, 0, 0, &bprm.inode, NULL);
bprm695fs/exec.cbprm.p = copy_strings(1, &bprm.filename, bprm.page, bprm.p, 2);
bprm696fs/exec.cbprm.exec = bprm.p;
bprm697fs/exec.cbprm.p = copy_strings(bprm.envc,envp,bprm.page,bprm.p,0);
bprm698fs/exec.cbprm.p = copy_strings(bprm.argc,argv,bprm.page,bprm.p,0);
bprm699fs/exec.cif (!bprm.p) {
bprm705fs/exec.cbprm.sh_bang = sh_bang;
bprm710fs/exec.cretval = fn(&bprm, regs);
bprm712fs/exec.ciput(bprm.inode);
bprm720fs/exec.ciput(bprm.inode);
bprm723fs/exec.cfree_page(bprm.page[i]);
bprm743fs/exec.cstatic int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
bprm749fs/exec.cunsigned long p = bprm->p;
bprm752fs/exec.cex = *((struct exec *) bprm->buf);    /* exec-header */
bprm756fs/exec.cbprm->inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
bprm770fs/exec.c(fd_offset < bprm->inode->i_sb->s_blocksize)) {
bprm777fs/exec.cflush_old_exec(bprm);
bprm788fs/exec.ccurrent->suid = current->euid = current->fsuid = bprm->e_uid;
bprm789fs/exec.ccurrent->sgid = current->egid = current->fsgid = bprm->e_gid;
bprm794fs/exec.cread_exec(bprm->inode, 32, (char *) 0, ex.a_text+ex.a_data, 0);
bprm799fs/exec.cfd = open_inode(bprm->inode, O_RDONLY);
bprm809fs/exec.cread_exec(bprm->inode, fd_offset,
bprm849fs/exec.cfd_offset = setup_arg_pages(ex.a_text,bprm->page) - MAX_ARG_PAGES*PAGE_SIZE;
bprm851fs/exec.cif (bprm->loader)
bprm852fs/exec.cbprm->loader += fd_offset;
bprm853fs/exec.cbprm->exec += fd_offset;
bprm855fs/exec.cp = (unsigned long)create_tables((char *)p, bprm,
bprm49include/linux/binfmts.hextern void flush_old_exec(struct linux_binprm * bprm);
bprm51include/linux/binfmts.hextern unsigned long * create_tables(char * p,struct linux_binprm * bprm,int ibcs);