res at colnet.uucp
Sat Jun 22 07:55:03 AEST 1991
In article <1991Jun21.151926.15624 at umbc3.umbc.edu> alex at umbc4.umbc.edu (Alex S. Crain) writes:
>6]What would happen if some guinea pog modified the ifile to start a program
>much lower in memory? How much lower could you safely go? Any takers?
> It would crash with a segmentation violation and be very boring.
Correct, with one corrollary: On 3.51 (and I believe 3.5) the first page
of virtual memory is read/only and filled with zeros. This was done, I
believe, to permit programs that (incorrectly) dereference the NULL pointer
to work without causing the segmentation fault Alex describes above. (There
were so many examples of this problem floating around, it was giving the
Unix-PC OS people nightmares.)
Fine, I thought: They just allocated 4K and set up the MMU for R/O access.
However, on closer inspection of the hardware, I found what I believe is a
prohibition against accessing memory below x80000 in the MMU firmware itself:
The firmware appears to use the supervisor/user mode state signal from the
68010 to prohibit user level access to the lower x80000 bytes, regardless of
the actual MMU state for page zero. Can anyone confirm or refute this, and
if it is so, how does the OS allow read access to page zero?
Rob Stampfli, 614-864-9377, res at kd8wk.uucp (osu-cis!kd8wk!res), kd8wk at n8jyv.oh
More information about the Comp.sys.3b1