home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / kernel-s / v1.1 / slackwar.000 < prev    next >
Text File  |  1995-10-10  |  22KB  |  721 lines

  1. diff -u --recursive --new-file linux-1.1.55+new_quota+alpha/.version linux/.version
  2. --- linux-1.1.55+new_quota+alpha/.version    Wed Dec 31 18:00:00 1969
  3. +++ linux/.version    Thu Oct 20 18:27:07 1994
  4. @@ -0,0 +1 @@
  5. +1
  6. diff -u --recursive --new-file linux-1.1.55+new_quota+alpha/drivers/block/ramdisk.c linux/drivers/block/ramdisk.c
  7. --- linux-1.1.55+new_quota+alpha/drivers/block/ramdisk.c    Thu Oct 13 21:31:06 1994
  8. +++ linux/drivers/block/ramdisk.c    Thu Oct 20 18:22:55 1994
  9. @@ -186,7 +186,12 @@
  10.          return;
  11.  
  12.      /* for Slackware install disks */
  13. -    printk(KERN_NOTICE "VFS: Insert ramdisk floppy and press ENTER\n");
  14. +        /* Pat's ugly hack */
  15. +        printk(KERN_NOTICE "\n\nPlease remove the boot kernel disk from your floppy drive, insert a\n");
  16. +        printk(KERN_NOTICE "root/install disk (such as one of the Slackware color144, colrlite,\n");
  17. +        printk(KERN_NOTICE "tty144, or tty12 disks) or some other disk you wish to load into a\n");
  18. +        printk(KERN_NOTICE "ramdisk and boot, and then press ENTER to continue.\n\n");
  19. +/*    printk(KERN_NOTICE "VFS: Insert ramdisk floppy and press ENTER\n"); */
  20.      wait_for_keypress();
  21.  
  22.      memset(&filp, 0, sizeof(filp));
  23. diff -u --recursive --new-file linux-1.1.55+new_quota+alpha/fs/binfmt_elf.c linux/fs/binfmt_elf.c
  24. --- linux-1.1.55+new_quota+alpha/fs/binfmt_elf.c    Thu Oct 20 17:01:16 1994
  25. +++ linux/fs/binfmt_elf.c    Thu Oct 20 18:48:18 1994
  26. @@ -497,8 +497,6 @@
  27.      current->mm->end_code = 0;
  28.      current->mm->start_mmap = ELF_START_MMAP;
  29.      current->mm->mmap = NULL;
  30. -    current->flags &= ~PF_FORKNOEXEC; /* accounting flags */
  31. -        current->io_usage = 0;
  32.      elf_entry = (unsigned int) elf_ex.e_entry;
  33.      
  34.      /* Do this so that we can load the interpreter, if need be.  We will
  35. @@ -791,639 +789,3 @@
  36.      unregister_binfmt(&elf_format);
  37.  }
  38.  #endif
  39. -/*
  40. - * linux/fs/binfmt_elf.c
  41. - */
  42. -#include <linux/fs.h>
  43. -#include <linux/sched.h>
  44. -#include <linux/mm.h>
  45. -#include <linux/mman.h>
  46. -#include <linux/a.out.h>
  47. -#include <linux/errno.h>
  48. -#include <linux/signal.h>
  49. -#include <linux/binfmts.h>
  50. -#include <linux/string.h>
  51. -#include <linux/fcntl.h>
  52. -#include <linux/ptrace.h>
  53. -#include <linux/malloc.h>
  54. -#include <linux/shm.h>
  55. -
  56. -#include <asm/segment.h>
  57. -
  58. -asmlinkage int sys_exit(int exit_code);
  59. -asmlinkage int sys_close(unsigned fd);
  60. -asmlinkage int sys_open(const char *, int, int);
  61. -asmlinkage int sys_brk(unsigned long);
  62. -
  63. -#define DLINFO_ITEMS 8
  64. -
  65. -#include <linux/elf.h>
  66. -
  67. -/* We need to explicitly zero any fractional pages
  68. -   after the data section (i.e. bss).  This would
  69. -   contain the junk from the file that should not
  70. -   be in memory */
  71. -
  72. -static void padzero(int elf_bss){
  73. -  unsigned int fpnt, nbyte;
  74. -  
  75. -  if(elf_bss & 0xfff) {
  76. -    
  77. -    nbyte = (PAGE_SIZE - (elf_bss & 0xfff)) & 0xfff;
  78. -    if(nbyte){
  79. -      verify_area(VERIFY_WRITE, (void *) elf_bss, nbyte);
  80. -      
  81. -      fpnt = elf_bss;
  82. -      while(fpnt & 0xfff) put_fs_byte(0, fpnt++);
  83. -    };
  84. -  };
  85. -}
  86. -
  87. -unsigned long * create_elf_tables(char * p,int argc,int envc,struct elfhdr * exec, unsigned int load_addr, int ibcs)
  88. -{
  89. -    unsigned long *argv,*envp, *dlinfo;
  90. -    unsigned long * sp;
  91. -    struct vm_area_struct *mpnt;
  92. -
  93. -    mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
  94. -    if (mpnt) {
  95. -        mpnt->vm_task = current;
  96. -        mpnt->vm_start = PAGE_MASK & (unsigned long) p;
  97. -        mpnt->vm_end = TASK_SIZE;
  98. -        mpnt->vm_page_prot = PAGE_PRIVATE|PAGE_DIRTY;
  99. -        mpnt->vm_share = NULL;
  100. -        mpnt->vm_inode = NULL;
  101. -        mpnt->vm_offset = 0;
  102. -        mpnt->vm_ops = NULL;
  103. -        insert_vm_struct(current, mpnt);
  104. -        current->mm->stk_vma = mpnt;
  105. -    }
  106. -    sp = (unsigned long *) (0xfffffffc & (unsigned long) p);
  107. -    if(exec) sp -= DLINFO_ITEMS*2;
  108. -    dlinfo = sp;
  109. -    sp -= envc+1;
  110. -    envp = sp;
  111. -    sp -= argc+1;
  112. -    argv = sp;
  113. -    if (!ibcs) {
  114. -        put_fs_long((unsigned long)envp,--sp);
  115. -        put_fs_long((unsigned long)argv,--sp);
  116. -    }
  117. -
  118. -    /* The constant numbers (0-9) that we are writing here are
  119. -       described in the header file sys/auxv.h on at least
  120. -       some versions of SVr4 */
  121. -    if(exec) { /* Put this here for an ELF program interpreter */
  122. -      struct elf_phdr * eppnt;
  123. -      eppnt = (struct elf_phdr *) exec->e_phoff;
  124. -      put_fs_long(3,dlinfo++); put_fs_long(load_addr + exec->e_phoff,dlinfo++);
  125. -      put_fs_long(4,dlinfo++); put_fs_long(sizeof(struct elf_phdr),dlinfo++);
  126. -      put_fs_long(5,dlinfo++); put_fs_long(exec->e_phnum,dlinfo++);
  127. -      put_fs_long(9,dlinfo++); put_fs_long((unsigned long) exec->e_entry,dlinfo++);
  128. -      put_fs_long(7,dlinfo++); put_fs_long(SHM_RANGE_START,dlinfo++);
  129. -      put_fs_long(8,dlinfo++); put_fs_long(0,dlinfo++);
  130. -      put_fs_long(6,dlinfo++); put_fs_long(PAGE_SIZE,dlinfo++);
  131. -      put_fs_long(0,dlinfo++); put_fs_long(0,dlinfo++);
  132. -    };
  133. -
  134. -    put_fs_long((unsigned long)argc,--sp);
  135. -    current->mm->arg_start = (unsigned long) p;
  136. -    while (argc-->0) {
  137. -        put_fs_long((unsigned long) p,argv++);
  138. -        while (get_fs_byte(p++)) /* nothing */ ;
  139. -    }
  140. -    put_fs_long(0,argv);
  141. -    current->mm->arg_end = current->mm->env_start = (unsigned long) p;
  142. -    while (envc-->0) {
  143. -        put_fs_long((unsigned long) p,envp++);
  144. -        while (get_fs_byte(p++)) /* nothing */ ;
  145. -    }
  146. -    put_fs_long(0,envp);
  147. -    current->mm->env_end = (unsigned long) p;
  148. -    return sp;
  149. -}
  150. -
  151. -
  152. -/* This is much more generalized than the library routine read function,
  153. -   so we keep this separate.  Techincally the library read function
  154. -   is only provided so that we can read a.out libraries that have
  155. -   an ELF header */
  156. -
  157. -static unsigned int load_elf_interp(struct elfhdr * interp_elf_ex,
  158. -                 struct inode * interpreter_inode)
  159. -{
  160. -        struct file * file;
  161. -    struct elf_phdr *elf_phdata  =  NULL;
  162. -    struct elf_phdr *eppnt;
  163. -    unsigned int len;
  164. -    unsigned int load_addr;
  165. -    int elf_exec_fileno;
  166. -    int elf_bss;
  167. -    int old_fs, retval;
  168. -    unsigned int last_bss;
  169. -    int error;
  170. -    int i, k;
  171. -    
  172. -    elf_bss = 0;
  173. -    last_bss = 0;
  174. -    error = load_addr = 0;
  175. -    
  176. -    /* First of all, some simple consistency checks */
  177. -    if((interp_elf_ex->e_type != ET_EXEC && 
  178. -        interp_elf_ex->e_type != ET_DYN) || 
  179. -       (interp_elf_ex->e_machine != EM_386 && interp_elf_ex->e_machine != EM_486) ||
  180. -       (!interpreter_inode->i_op || !interpreter_inode->i_op->bmap || 
  181. -        !interpreter_inode->i_op->default_file_ops->mmap)){
  182. -        return 0xffffffff;
  183. -    };
  184. -    
  185. -    /* Now read in all of the header information */
  186. -    
  187. -    if(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum > PAGE_SIZE) 
  188. -        return 0xffffffff;
  189. -    
  190. -    elf_phdata =  (struct elf_phdr *) 
  191. -        kmalloc(sizeof(struct elf_phdr) * interp_elf_ex->e_phnum, GFP_KERNEL);
  192. -    if(!elf_phdata) return 0xffffffff;
  193. -    
  194. -    old_fs = get_fs();
  195. -    set_fs(get_ds());
  196. -    retval = read_exec(interpreter_inode, interp_elf_ex->e_phoff, (char *) elf_phdata,
  197. -               sizeof(struct elf_phdr) * interp_elf_ex->e_phnum);
  198. -    set_fs(old_fs);
  199. -    
  200. -    elf_exec_fileno = open_inode(interpreter_inode, O_RDONLY);
  201. -    if (elf_exec_fileno < 0) return 0xffffffff;
  202. -    file = current->files->fd[elf_exec_fileno];
  203. -
  204. -    eppnt = elf_phdata;
  205. -    for(i=0; i<interp_elf_ex->e_phnum; i++, eppnt++)
  206. -      if(eppnt->p_type == PT_LOAD) {
  207. -        error = do_mmap(file, 
  208. -                eppnt->p_vaddr & 0xfffff000,
  209. -                eppnt->p_filesz + (eppnt->p_vaddr & 0xfff),
  210. -                PROT_READ | PROT_WRITE | PROT_EXEC,
  211. -                MAP_PRIVATE | (interp_elf_ex->e_type == ET_EXEC ? MAP_FIXED : 0),
  212. -                eppnt->p_offset & 0xfffff000);
  213. -        
  214. -        if(!load_addr && interp_elf_ex->e_type == ET_DYN)
  215. -          load_addr = error;
  216. -        k = load_addr + eppnt->p_vaddr + eppnt->p_filesz;
  217. -        if(k > elf_bss) elf_bss = k;
  218. -        if(error < 0 && error > -1024) break;  /* Real error */
  219. -        k = load_addr + eppnt->p_memsz + eppnt->p_vaddr;
  220. -        if(k > last_bss) last_bss = k;
  221. -      }
  222. -    
  223. -    /* Now use mmap to map the library into memory. */
  224. -
  225. -    
  226. -    sys_close(elf_exec_fileno);
  227. -    if(error < 0 && error > -1024) {
  228. -            kfree(elf_phdata);
  229. -        return 0xffffffff;
  230. -    }
  231. -
  232. -    padzero(elf_bss);
  233. -    len = (elf_bss + 0xfff) & 0xfffff000; /* What we have mapped so far */
  234. -
  235. -    /* Map the last of the bss segment */
  236. -    if (last_bss > len)
  237. -      do_mmap(NULL, len, last_bss-len,
  238. -          PROT_READ|PROT_WRITE|PROT_EXEC,
  239. -          MAP_FIXED|MAP_PRIVATE, 0);
  240. -    kfree(elf_phdata);
  241. -
  242. -    return ((unsigned int) interp_elf_ex->e_entry) + load_addr;
  243. -}
  244. -
  245. -static unsigned int load_aout_interp(struct exec * interp_ex,
  246. -                 struct inode * interpreter_inode)
  247. -{
  248. -  int retval;
  249. -  unsigned int elf_entry;
  250. -  
  251. -  current->mm->brk = interp_ex->a_bss +
  252. -    (current->mm->end_data = interp_ex->a_data +
  253. -     (current->mm->end_code = interp_ex->a_text));
  254. -  elf_entry = interp_ex->a_entry;
  255. -  
  256. -  
  257. -  if (N_MAGIC(*interp_ex) == OMAGIC) {
  258. -    do_mmap(NULL, 0, interp_ex->a_text+interp_ex->a_data,
  259. -        PROT_READ|PROT_WRITE|PROT_EXEC,
  260. -        MAP_FIXED|MAP_PRIVATE, 0);
  261. -    retval = read_exec(interpreter_inode, 32, (char *) 0, 
  262. -               interp_ex->a_text+interp_ex->a_data);
  263. -  } else if (N_MAGIC(*interp_ex) == ZMAGIC || N_MAGIC(*interp_ex) == QMAGIC) {
  264. -    do_mmap(NULL, 0, interp_ex->a_text+interp_ex->a_data,
  265. -        PROT_READ|PROT_WRITE|PROT_EXEC,
  266. -        MAP_FIXED|MAP_PRIVATE, 0);
  267. -    retval = read_exec(interpreter_inode,
  268. -               N_TXTOFF(*interp_ex) ,
  269. -               (char *) N_TXTADDR(*interp_ex),
  270. -               interp_ex->a_text+interp_ex->a_data);
  271. -  } else
  272. -    retval = -1;
  273. -  
  274. -  if(retval >= 0)
  275. -    do_mmap(NULL, (interp_ex->a_text + interp_ex->a_data + 0xfff) & 
  276. -        0xfffff000, interp_ex->a_bss,
  277. -        PROT_READ|PROT_WRITE|PROT_EXEC,
  278. -        MAP_FIXED|MAP_PRIVATE, 0);
  279. -  if(retval < 0) return 0xffffffff;
  280. -  return elf_entry;
  281. -}
  282. -
  283. -/*
  284. - * These are the functions used to load ELF style executables and shared
  285. - * libraries.  There is no binary dependent code anywhere else.
  286. - */
  287. -
  288. -#define INTERPRETER_NONE 0
  289. -#define INTERPRETER_AOUT 1
  290. -#define INTERPRETER_ELF 2
  291. -
  292. -int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
  293. -{
  294. -    struct elfhdr elf_ex;
  295. -    struct elfhdr interp_elf_ex;
  296. -    struct file * file;
  297. -      struct exec interp_ex;
  298. -    struct inode *interpreter_inode;
  299. -    unsigned int load_addr;
  300. -    unsigned int interpreter_type = INTERPRETER_NONE;
  301. -    int i;
  302. -    int old_fs;
  303. -    int error;
  304. -    struct elf_phdr * elf_ppnt, *elf_phdata;
  305. -    int elf_exec_fileno;
  306. -    unsigned int elf_bss, k, elf_brk;
  307. -    int retval;
  308. -    char * elf_interpreter;
  309. -    unsigned int elf_entry;
  310. -    int status;
  311. -    unsigned int start_code, end_code, end_data;
  312. -    unsigned int elf_stack;
  313. -    char passed_fileno[6];
  314. -    
  315. -    status = 0;
  316. -    load_addr = 0;
  317. -    elf_ex = *((struct elfhdr *) bprm->buf);      /* exec-header */
  318. -    
  319. -    if (elf_ex.e_ident[0] != 0x7f ||
  320. -        strncmp(&elf_ex.e_ident[1], "ELF",3) != 0)
  321. -        return  -ENOEXEC;
  322. -    
  323. -    
  324. -    /* First of all, some simple consistency checks */
  325. -    if(elf_ex.e_type != ET_EXEC || 
  326. -       (elf_ex.e_machine != EM_386 && elf_ex.e_machine != EM_486) ||
  327. -       (!bprm->inode->i_op || !bprm->inode->i_op->default_file_ops ||
  328. -        !bprm->inode->i_op->default_file_ops->mmap)){
  329. -        return -ENOEXEC;
  330. -    };
  331. -    
  332. -    /* Now read in all of the header information */
  333. -    
  334. -    elf_phdata = (struct elf_phdr *) kmalloc(elf_ex.e_phentsize * 
  335. -                         elf_ex.e_phnum, GFP_KERNEL);
  336. -    
  337. -    old_fs = get_fs();
  338. -    set_fs(get_ds());
  339. -    retval = read_exec(bprm->inode, elf_ex.e_phoff, (char *) elf_phdata,
  340. -               elf_ex.e_phentsize * elf_ex.e_phnum);
  341. -    set_fs(old_fs);
  342. -    if (retval < 0) {
  343. -            kfree (elf_phdata);
  344. -        return retval;
  345. -    }
  346. -    
  347. -    elf_ppnt = elf_phdata;
  348. -    
  349. -    elf_bss = 0;
  350. -    elf_brk = 0;
  351. -    
  352. -    elf_exec_fileno = open_inode(bprm->inode, O_RDONLY);
  353. -
  354. -    if (elf_exec_fileno < 0) {
  355. -            kfree (elf_phdata);
  356. -        return elf_exec_fileno;
  357. -    }
  358. -    
  359. -    file = current->files->fd[elf_exec_fileno];
  360. -    
  361. -    elf_stack = 0xffffffff;
  362. -    elf_interpreter = NULL;
  363. -    start_code = 0;
  364. -    end_code = 0;
  365. -    end_data = 0;
  366. -    
  367. -    old_fs = get_fs();
  368. -    set_fs(get_ds());
  369. -    
  370. -    for(i=0;i < elf_ex.e_phnum; i++){
  371. -        if(elf_ppnt->p_type == PT_INTERP) {
  372. -            /* This is the program interpreter used for shared libraries - 
  373. -               for now assume that this is an a.out format binary */
  374. -            
  375. -            elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz, 
  376. -                               GFP_KERNEL);
  377. -            
  378. -            retval = read_exec(bprm->inode,elf_ppnt->p_offset,elf_interpreter,
  379. -                       elf_ppnt->p_filesz);
  380. -#if 0
  381. -            printk("Using ELF interpreter %s\n", elf_interpreter);
  382. -#endif
  383. -            if(retval >= 0)
  384. -                retval = namei(elf_interpreter, &interpreter_inode);
  385. -            if(retval >= 0)
  386. -                retval = read_exec(interpreter_inode,0,bprm->buf,128);
  387. -            
  388. -            if(retval >= 0){
  389. -                interp_ex = *((struct exec *) bprm->buf);        /* exec-header */
  390. -                interp_elf_ex = *((struct elfhdr *) bprm->buf);      /* exec-header */
  391. -                
  392. -            };
  393. -            if(retval < 0) {
  394. -              kfree (elf_phdata);
  395. -              kfree(elf_interpreter);
  396. -              return retval;
  397. -            };
  398. -        };
  399. -        elf_ppnt++;
  400. -    };
  401. -    
  402. -    set_fs(old_fs);
  403. -    
  404. -    /* Some simple consistency checks for the interpreter */
  405. -    if(elf_interpreter){
  406. -            interpreter_type = INTERPRETER_ELF | INTERPRETER_AOUT;
  407. -        if(retval < 0) {
  408. -            kfree(elf_interpreter);
  409. -            kfree(elf_phdata);
  410. -            return -ELIBACC;
  411. -        };
  412. -        /* Now figure out which format our binary is */
  413. -        if((N_MAGIC(interp_ex) != OMAGIC) && 
  414. -           (N_MAGIC(interp_ex) != ZMAGIC) &&
  415. -           (N_MAGIC(interp_ex) != QMAGIC)) 
  416. -          interpreter_type = INTERPRETER_ELF;
  417. -
  418. -        if (interp_elf_ex.e_ident[0] != 0x7f ||
  419. -            strncmp(&interp_elf_ex.e_ident[1], "ELF",3) != 0)
  420. -          interpreter_type &= ~INTERPRETER_ELF;
  421. -
  422. -        if(!interpreter_type)
  423. -          {
  424. -            kfree(elf_interpreter);
  425. -            kfree(elf_phdata);
  426. -            return -ELIBBAD;
  427. -          };
  428. -    }
  429. -    
  430. -    /* OK, we are done with that, now set up the arg stuff,
  431. -       and then start this sucker up */
  432. -    
  433. -    if (!bprm->sh_bang) {
  434. -        char * passed_p;
  435. -        
  436. -        if(interpreter_type == INTERPRETER_AOUT) {
  437. -          sprintf(passed_fileno, "%d", elf_exec_fileno);
  438. -          passed_p = passed_fileno;
  439. -        
  440. -          if(elf_interpreter) {
  441. -            bprm->p = copy_strings(1,&passed_p,bprm->page,bprm->p,2);
  442. -            bprm->argc++;
  443. -          };
  444. -        };
  445. -        if (!bprm->p) {
  446. -                if(elf_interpreter) {
  447. -                  kfree(elf_interpreter);
  448. -            }
  449. -                kfree (elf_phdata);
  450. -            return -E2BIG;
  451. -        }
  452. -    }
  453. -    
  454. -    /* OK, This is the point of no return */
  455. -    flush_old_exec(bprm);
  456. -
  457. -    current->mm->end_data = 0;
  458. -    current->mm->end_code = 0;
  459. -    current->mm->start_mmap = ELF_START_MMAP;
  460. -    current->mm->mmap = NULL;
  461. -    elf_entry = (unsigned int) elf_ex.e_entry;
  462. -    
  463. -    /* Do this so that we can load the interpreter, if need be.  We will
  464. -       change some of these later */
  465. -    current->mm->rss = 0;
  466. -    bprm->p += change_ldt(0, bprm->page);
  467. -    current->mm->start_stack = bprm->p;
  468. -    
  469. -    /* Now we do a little grungy work by mmaping the ELF image into
  470. -       the correct location in memory.  At this point, we assume that
  471. -       the image should be loaded at fixed address, not at a variable
  472. -       address. */
  473. -    
  474. -    old_fs = get_fs();
  475. -    set_fs(get_ds());
  476. -    
  477. -    elf_ppnt = elf_phdata;
  478. -    for(i=0;i < elf_ex.e_phnum; i++){
  479. -        
  480. -        if(elf_ppnt->p_type == PT_INTERP) {
  481. -            /* Set these up so that we are able to load the interpreter */
  482. -          /* Now load the interpreter into user address space */
  483. -          set_fs(old_fs);
  484. -
  485. -          if(interpreter_type & 1) elf_entry = 
  486. -            load_aout_interp(&interp_ex, interpreter_inode);
  487. -
  488. -          if(interpreter_type & 2) elf_entry = 
  489. -            load_elf_interp(&interp_elf_ex, interpreter_inode);
  490. -
  491. -          old_fs = get_fs();
  492. -          set_fs(get_ds());
  493. -
  494. -          iput(interpreter_inode);
  495. -          kfree(elf_interpreter);
  496. -            
  497. -          if(elf_entry == 0xffffffff) { 
  498. -            printk("Unable to load interpreter\n");
  499. -            kfree(elf_phdata);
  500. -            send_sig(SIGSEGV, current, 0);
  501. -            return 0;
  502. -          };
  503. -        };
  504. -        
  505. -        
  506. -        if(elf_ppnt->p_type == PT_LOAD) {
  507. -            error = do_mmap(file,
  508. -                    elf_ppnt->p_vaddr & 0xfffff000,
  509. -                    elf_ppnt->p_filesz + (elf_ppnt->p_vaddr & 0xfff),
  510. -                    PROT_READ | PROT_WRITE | PROT_EXEC,
  511. -                    MAP_FIXED | MAP_PRIVATE,
  512. -                    elf_ppnt->p_offset & 0xfffff000);
  513. -            
  514. -#ifdef LOW_ELF_STACK
  515. -            if(elf_ppnt->p_vaddr & 0xfffff000 < elf_stack) 
  516. -                elf_stack = elf_ppnt->p_vaddr & 0xfffff000;
  517. -#endif
  518. -            
  519. -            if(!load_addr) 
  520. -              load_addr = elf_ppnt->p_vaddr - elf_ppnt->p_offset;
  521. -            k = elf_ppnt->p_vaddr;
  522. -            if(k > start_code) start_code = k;
  523. -            k = elf_ppnt->p_vaddr + elf_ppnt->p_filesz;
  524. -            if(k > elf_bss) elf_bss = k;
  525. -            if((elf_ppnt->p_flags | PROT_WRITE) && end_code <  k)
  526. -                end_code = k; 
  527. -            if(end_data < k) end_data = k; 
  528. -            k = elf_ppnt->p_vaddr + elf_ppnt->p_memsz;
  529. -            if(k > elf_brk) elf_brk = k;             
  530. -              };
  531. -        elf_ppnt++;
  532. -    };
  533. -    set_fs(old_fs);
  534. -    
  535. -    kfree(elf_phdata);
  536. -    
  537. -    if(!elf_interpreter) sys_close(elf_exec_fileno);
  538. -    current->elf_executable = 1;
  539. -    current->executable = bprm->inode;
  540. -    bprm->inode->i_count++;
  541. -#ifdef LOW_ELF_STACK
  542. -    current->start_stack = p = elf_stack - 4;
  543. -#endif
  544. -    bprm->p -= MAX_ARG_PAGES*PAGE_SIZE;
  545. -    bprm->p = (unsigned long) 
  546. -      create_elf_tables((char *)bprm->p,
  547. -            bprm->argc,
  548. -            bprm->envc,
  549. -            (interpreter_type == INTERPRETER_ELF ? &elf_ex : NULL),
  550. -            load_addr,    
  551. -            (interpreter_type == INTERPRETER_AOUT ? 0 : 1));
  552. -    if(interpreter_type == INTERPRETER_AOUT)
  553. -      current->mm->arg_start += strlen(passed_fileno) + 1;
  554. -    current->mm->start_brk = current->mm->brk = elf_brk;
  555. -    current->mm->end_code = end_code;
  556. -    current->mm->start_code = start_code;
  557. -    current->mm->end_data = end_data;
  558. -    current->mm->start_stack = bprm->p;
  559. -    current->suid = current->euid = bprm->e_uid;
  560. -    current->sgid = current->egid = bprm->e_gid;
  561. -
  562. -    /* Calling sys_brk effectively mmaps the pages that we need for the bss and break
  563. -       sections */
  564. -    current->mm->brk = (elf_bss + 0xfff) & 0xfffff000;
  565. -    sys_brk((elf_brk + 0xfff) & 0xfffff000);
  566. -
  567. -    padzero(elf_bss);
  568. -
  569. -    /* Why this, you ask???  Well SVr4 maps page 0 as read-only,
  570. -       and some applications "depend" upon this behavior.
  571. -       Since we do not have the power to recompile these, we
  572. -       emulate the SVr4 behavior.  Sigh.  */
  573. -    error = do_mmap(NULL, 0, 4096, PROT_READ | PROT_EXEC,
  574. -            MAP_FIXED | MAP_PRIVATE, 0);
  575. -
  576. -    regs->eip = elf_entry;        /* eip, magic happens :-) */
  577. -    regs->esp = bprm->p;            /* stack pointer */
  578. -    if (current->flags & PF_PTRACED)
  579. -        send_sig(SIGTRAP, current, 0);
  580. -    return 0;
  581. -}
  582. -
  583. -/* This is really simpleminded and specialized - we are loading an
  584. -   a.out library that is given an ELF header. */
  585. -
  586. -int load_elf_library(int fd){
  587. -        struct file * file;
  588. -    struct elfhdr elf_ex;
  589. -    struct elf_phdr *elf_phdata  =  NULL;
  590. -    struct  inode * inode;
  591. -    unsigned int len;
  592. -    int elf_bss;
  593. -    int old_fs, retval;
  594. -    unsigned int bss;
  595. -    int error;
  596. -    int i,j, k;
  597. -    
  598. -    len = 0;
  599. -    file = current->files->fd[fd];
  600. -    inode = file->f_inode;
  601. -    elf_bss = 0;
  602. -    
  603. -    set_fs(KERNEL_DS);
  604. -    if (file->f_op->read(inode, file, (char *) &elf_ex, sizeof(elf_ex)) != sizeof(elf_ex)) {
  605. -        sys_close(fd);
  606. -        return -EACCES;
  607. -    }
  608. -    set_fs(USER_DS);
  609. -    
  610. -    if (elf_ex.e_ident[0] != 0x7f ||
  611. -        strncmp(&elf_ex.e_ident[1], "ELF",3) != 0)
  612. -        return -ENOEXEC;
  613. -    
  614. -    /* First of all, some simple consistency checks */
  615. -    if(elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 ||
  616. -       (elf_ex.e_machine != EM_386 && elf_ex.e_machine != EM_486) ||
  617. -       (!inode->i_op || !inode->i_op->bmap || 
  618. -        !inode->i_op->default_file_ops->mmap)){
  619. -        return -ENOEXEC;
  620. -    };
  621. -    
  622. -    /* Now read in all of the header information */
  623. -    
  624. -    if(sizeof(struct elf_phdr) * elf_ex.e_phnum > PAGE_SIZE) 
  625. -        return -ENOEXEC;
  626. -    
  627. -    elf_phdata =  (struct elf_phdr *) 
  628. -        kmalloc(sizeof(struct elf_phdr) * elf_ex.e_phnum, GFP_KERNEL);
  629. -    
  630. -    old_fs = get_fs();
  631. -    set_fs(get_ds());
  632. -    retval = read_exec(inode, elf_ex.e_phoff, (char *) elf_phdata,
  633. -               sizeof(struct elf_phdr) * elf_ex.e_phnum);
  634. -    set_fs(old_fs);
  635. -    
  636. -    j = 0;
  637. -    for(i=0; i<elf_ex.e_phnum; i++)
  638. -        if((elf_phdata + i)->p_type == PT_LOAD) j++;
  639. -    
  640. -    if(j != 1)  {
  641. -        kfree(elf_phdata);
  642. -        return -ENOEXEC;
  643. -    };
  644. -    
  645. -    while(elf_phdata->p_type != PT_LOAD) elf_phdata++;
  646. -    
  647. -    /* Now use mmap to map the library into memory. */
  648. -    error = do_mmap(file,
  649. -            elf_phdata->p_vaddr & 0xfffff000,
  650. -            elf_phdata->p_filesz + (elf_phdata->p_vaddr & 0xfff),
  651. -            PROT_READ | PROT_WRITE | PROT_EXEC,
  652. -            MAP_FIXED | MAP_PRIVATE,
  653. -            elf_phdata->p_offset & 0xfffff000);
  654. -
  655. -    k = elf_phdata->p_vaddr + elf_phdata->p_filesz;
  656. -    if(k > elf_bss) elf_bss = k;
  657. -    
  658. -    sys_close(fd);
  659. -    if (error != elf_phdata->p_vaddr & 0xfffff000) {
  660. -            kfree(elf_phdata);
  661. -        return error;
  662. -    }
  663. -
  664. -    padzero(elf_bss);
  665. -
  666. -    len = (elf_phdata->p_filesz + elf_phdata->p_vaddr+ 0xfff) & 0xfffff000;
  667. -    bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
  668. -    if (bss > len)
  669. -      do_mmap(NULL, len, bss-len,
  670. -          PROT_READ|PROT_WRITE|PROT_EXEC,
  671. -          MAP_FIXED|MAP_PRIVATE, 0);
  672. -    kfree(elf_phdata);
  673. -    return 0;
  674. -}
  675. diff -u --recursive --new-file linux-1.1.55+new_quota+alpha/include/linux/autoconf.h linux/include/linux/autoconf.h
  676. --- linux-1.1.55+new_quota+alpha/include/linux/autoconf.h    Thu Oct 20 17:09:32 1994
  677. +++ linux/include/linux/autoconf.h    Thu Oct 20 18:24:19 1994
  678. @@ -12,8 +12,9 @@
  679.  #undef  CONFIG_QUOTA
  680.  #undef  CONFIG_MAX_16M
  681.  #define CONFIG_SYSVIPC 1
  682. -#define CONFIG_BINFMT_ELF 1
  683.  #define CONFIG_M486 1
  684. +#define CONFIG_BINFMT_ELF 1
  685. +#define ALPHA_SLACK 1
  686.  
  687.  /*
  688.   * Networking options
  689. @@ -49,6 +50,9 @@
  690.  #define CONFIG_SCSI_AHA152X 1
  691.  #define CONFIG_SCSI_AHA1542 1
  692.  #define CONFIG_SCSI_AHA1740 1
  693. +#define CONFIG_SCSI_AHA274X 1
  694. +#undef  CONFIG_SCSI_IN2000
  695. +#undef  CONFIG_SCSI_EATA
  696.  #define CONFIG_SCSI_BUSLOGIC 1
  697.  #define CONFIG_SCSI_FUTURE_DOMAIN 1
  698.  #define CONFIG_SCSI_GENERIC_NCR5380 1
  699. @@ -103,6 +107,8 @@
  700.   * CD-ROM drivers
  701.   */
  702.  #undef  CONFIG_CDU31A
  703. +#undef  CONFIG_CDU535
  704. +#undef  CONFIG_NEC260
  705.  #undef  CONFIG_MCD
  706.  #undef  CONFIG_SBPCD
  707.  
  708. diff -u --recursive --new-file linux-1.1.55+new_quota+alpha/tools/version.h linux/tools/version.h
  709. --- linux-1.1.55+new_quota+alpha/tools/version.h    Thu Oct 20 18:15:38 1994
  710. +++ linux/tools/version.h    Thu Oct 20 18:27:09 1994
  711. @@ -1,6 +1,6 @@
  712. -#define UTS_RELEASE "1.1.53"
  713. -#define UTS_VERSION "#8 Wed Oct 12 21:48:39 CDT 1994"
  714. -#define LINUX_COMPILE_TIME "21:48:39"
  715. +#define UTS_RELEASE "1.1.55"
  716. +#define UTS_VERSION "#1 Thu Oct 20 18:27:08 CDT 1994"
  717. +#define LINUX_COMPILE_TIME "18:27:08"
  718.  #define LINUX_COMPILE_BY "root"
  719.  #define LINUX_COMPILE_HOST "fuzzy"
  720.  #define LINUX_COMPILE_DOMAIN "is.a.good.cat"
  721.