Hi! I know it's not usual to post diffs to this list, but as 1.15.8b has some serious problems, I decided to so. This way, everyone compiling the kernel her/himself can get a far more stable one. Please excuse the maybe rude tone in the "CHANGES.Gryf"-file, but I was more than annoyed when I found the reasons for the problems I encountered when trying to use 1.15.8b. Ciao Thomas -- Thomas Binder (Gryf @ IRCNet) gryf@hrzpub.tu-darmstadt.de PGP-key available on request! binder@rbg.informatik.tu-darmstadt.de Vote against SPAM: http://www.politik-digital.de/spam/
--- orig/Makefile Fri May 5 13:47:38 2000 +++ src/Makefile Sun May 7 21:46:18 2000 @@ -328,7 +331,7 @@ sh cdef.sh buildheader: $(MKBUILD) - cd ./buildinfo; $(MKBUILD) + cd ./buildinfo; ./$(MKBUILD) buildserial: buildinfo/version.h cd ./buildinfo; echo 1 >$@ @@ -400,7 +403,7 @@ perl genmagic.pl > $@ else magic.i: $(GENMAGICPRG) $(HFILES) - $(GENMAGICPRG) $@ + ./$(GENMAGICPRG) $@ endif # --- orig/cnf.c Fri Apr 28 01:01:30 2000 +++ src/cnf.c Sat May 6 12:05:58 2000 @@ -77,6 +77,8 @@ # include "update.h" # include "util.h" # include "xbios.h" +# include "fasttext.h" +# include "mprot.h" /* program to run at startup */ @@ -276,7 +278,7 @@ static PCB_B pCB_hide_b; /* HIDE_B=[yn] */ /* ulong initialmem; * INITIALMEM=n */ static PCB_L pCB_maxmem; /* MAXMEM=n */ -extern ulong mem_prot_flags; /* MPFLAGS=bitvector */ +/* ulong mem_prot_flags; * MPFLAGS=bitvector */ static PCB_Dx pCB_newfatfs; /* NEWFATFS=<drives> */ static PCB_T pCB_prn; /* PRN=file */ static PCB_L pCL_securelevel; /* SECURELEVEL=n */ --- orig/fasttext.c Fri Apr 28 01:02:52 2000 +++ src/fasttext.c Sat May 6 12:19:16 2000 @@ -17,6 +17,7 @@ # include "dev-null.h" # include "kmemory.h" # include "syscall.h" +# include "time.h" # ifdef FASTTEXT --- orig/fasttext.h Sun Apr 2 15:34:12 2000 +++ src/fasttext.h Sat May 6 12:18:06 2000 @@ -10,7 +10,7 @@ extern DEVDRV screen_device; -extern int hardscroll; +extern short hardscroll; #define ALT_1 0x780000L #define ALT_2 0x790000L --- orig/libkern/asm/Makefile Tue Apr 18 12:31:24 2000 +++ src/libkern/asm/Makefile Sat May 6 13:02:18 2000 @@ -75,7 +75,9 @@ # DEPS_MAGIC := $(shell mkdir ./.deps > /dev/null 2>&1 || :) +ifneq ($(DEPENDENCIES),) -include $(DEPENDENCIES) +endif memset.o: memset.spp peekpoke.o: peekpoke.spp --- orig/memory.c Fri Apr 28 01:01:36 2000 +++ src/memory.c Sun May 7 18:30:26 2000 @@ -2544,7 +2544,7 @@ /* set PC, stack registers, etc. appropriately */ p->ctxt[CURRENT].pc = b->p_tbase; - /* The "-0x20" is to make sure that syscall.s won't run past the end + /* The "-0x28" is to make sure that syscall.s won't run past the end * of memory when the user makes a system call and doesn't push very * many parameters -- syscall always tries to copy the maximum * possible number of parms. @@ -2554,10 +2554,10 @@ * to ensure compatibility with older versions of MiNT, which ignore * p_hitpa. */ - if (valid_address(b->p_hitpa - 0x20)) - p->ctxt[CURRENT].usp = b->p_hitpa - 0x20; + if (valid_address(b->p_hitpa - 0x28)) + p->ctxt[CURRENT].usp = b->p_hitpa - 0x28; else - p->ctxt[CURRENT].usp = mem->loc + mem->len - 0x20; + p->ctxt[CURRENT].usp = mem->loc + mem->len - 0x28; p->ctxt[CURRENT].ssp = (long)(p->stack + ISTKSIZE); p->ctxt[CURRENT].term_vec = (long)rts; --- orig/filesys.c Wed Apr 19 12:29:34 2000 +++ src/filesys.c Mon May 8 00:23:20 2000 @@ -238,6 +238,8 @@ { DEBUG (("getxattr: copy stat")); + bzero (xattr, sizeof(*xattr)); + xattr->mode = stat.mode; xattr->index = stat.ino; xattr->dev = stat.dev; @@ -247,7 +249,10 @@ xattr->gid = stat.gid; xattr->size = stat.size; xattr->blksize = stat.blksize; - xattr->nblocks = stat.blocks / (stat.blksize >> 9); + if (stat.blksize < 512) + xattr->nblocks = stat.blocks; + else + xattr->nblocks = stat.blocks / (stat.blksize >> 9); *((long *) &(xattr->mtime)) = stat.mtime.time; *((long *) &(xattr->atime)) = stat.atime.time; @@ -298,7 +303,10 @@ stat->ctime.time = unixtime (xattr.ctime, xattr.cdate) + timezone; stat->size = xattr.size; - stat->blocks = xattr.nblocks * (xattr.blksize >> 9); + if (xattr.blksize < 512) + stat->blocks = xattr.nblocks; + else + stat->blocks = xattr.nblocks * (xattr.blksize >> 9); stat->blksize = xattr.blksize; stat->flags = 0; --- orig/CHANGES.Gryf Sun May 7 18:49:34 2000 +++ src/CHANGES.Gryf Mon May 8 00:24:40 2000 @@ -0,0 +1,33 @@ +cnf.c, fasttext.c: + - Again made changes to make -DFASTTEXT work. Frank, maybe it + would be a good idea to always test whether a kernel with all + possible -Ds enabled and one with all disabled will build + correctly _before_ releasing a beta ... + +memory.c: + - Due to draco's changes in syscall.spp (copying 36 bytes of + stack instead of 28), programs which called Pterm() using the + initial stackpointer failed with a memory protection, because + exec_region() set the usp to "end_of_tpa - 0x20". Looks like + the new trap handler hasn't been tested very thoroughly. + exec_region() now initializes the user stackpointer to + "end_of_tpa - 0x28", curing the problem. + +filesys.c: + - Yet another bug which makes me doubt the involved change has + been tested ... getxattr() didn't check whether blksize >> 9 + yiels 0 before dividing by it, causing an exception when + calling Fxattr() on files in /proc, /shm, and others with a + blksize of 1. + - getxattr() also didn't properly initialize the "attr" field, + leading to problems like shared memory no longer working or + programs displaying wrong file types. *xattr is now bzero()ed + before anything is written to it, to be on the safe side. + +Makefile: + - Added missing ./ in calls to mkbuild and genmagic - having "." + in $PATH isn't a good idea ... + +libkern/asm/Makefile: + - Prevent "-include $(DEPENDENCIES)" to be executed when + $(DEPENDENCIES) expands to the empty string
Attachment:
pgpjnOWfwR3rE.pgp
Description: PGP signature