VAX 4.2bsd /dev/kmem panic
Chris Torek
chris at umcp-cs.UUCP
Sun Mar 23 04:30:27 AEST 1986
My 4.3ish kernel does not crash with Rick's example, but the bug
is real. As a quick fix, I would suggest just disallowing accesses
to discontiguous regions. (The only one that makes even slight
sense is P1/S space, and no current programs cross the boundary in
a single read, or at least not intentionally.)
Change the very beginning of kernacc to read as follows (just add
the lines marked):
ENTRY(kernacc, 0) # in 4.2 it was `_kernacc:', I think
movl 4(ap),r0 # virtual address
+ bicl3 $0x3fffffff,r0,r1
+ addl3 8(ap),r0,r2 # ending virtual address
+ bicl2 $0x3fffffff,r2
+ cmpl r1,r2 # same region?
+ bneq kacerr # no, disallow it
bbcc $31,r0,kacc1
.
.
.
Warning: the above is untested.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at mimsy.umd.edu
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list