Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ulysses.UUCP Path: utzoo!linus!gatech!ulysses!ggs From: ggs@ulysses.UUCP (Griff Smith) Newsgroups: net.unix-wizards Subject: Re: Solved 4.2BSD panic trap 9 problem on VAX 11/785 Message-ID: <1046@ulysses.UUCP> Date: Wed, 14-Aug-85 22:02:34 EDT Article-I.D.: ulysses.1046 Posted: Wed Aug 14 22:02:34 1985 Date-Received: Thu, 15-Aug-85 22:26:26 EDT References: <578@brl-tgr.ARPA> <1041@ulysses.UUCP> <1202@umcp-cs.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 68 > >No! The fix is to insert a ".space n" directive immediately before > >the function in locore.s that is causing the problem. > > Yes, this is better, but is also more difficult to apply. It's ^^^^^^^^^^^^^^^^^^^^^^^? > much harder to push down, e.g, the probew in vax/trap.c this way. > Huh? The code in question is . . clrl 12(r2) ret _Copyin: .globl _Copyin # <<>> movl 12(sp),r0 # copy length blss ersb movl 4(sp),r1 # copy user address cmpl $NBPG,r0 # probing one page or less ? bgeq cishort # yes ciloop: prober $3,$NBPG,(r1) # bytes accessible ? beql ersb # no addl2 $NBPG,r1 # incr user address ptr acbl $NBPG+1,$-NBPG,r0,ciloop # reduce count and loop cishort: prober $3,r0,(r1) # bytes accessible ? beql ersb # no . . Change it to the following: . . clrl 12(r2) ret .space 50 # kludge to move probers to next page _Copyin: .globl _Copyin # <<>> movl 12(sp),r0 # copy length blss ersb movl 4(sp),r1 # copy user address cmpl $NBPG,r0 # probing one page or less ? bgeq cishort # yes ciloop: prober $3,$NBPG,(r1) # bytes accessible ? beql ersb # no addl2 $NBPG,r1 # incr user address ptr acbl $NBPG+1,$-NBPG,r0,ciloop # reduce count and loop cishort: prober $3,r0,(r1) # bytes accessible ? beql ersb # no . . There is nothing difficult about this. References to probes in C code are another problem; you probably WILL need to pad with nop's. So what? Nothing says you have to use the same solution in both languages. When casting spells in assembly, use the tools that are available. -- Griff Smith AT&T Bell Laboratories, Murray Hill Phone: (201) 582-7736 Internet: ggs@ulysses.uucp UUCP: ulysses!ggs ( {allegra|ihnp4}!ulysses!ggs )