Referencing through a null pointer

Chris Torek chris at mimsy.UUCP
Mon May 2 08:32:58 AEST 1988


In article <1013 at unmvax.unm.edu> mike at turing.UNM.EDU (Michael I. Bushnell)
writes:
>...there is one reason that you CAN'T make the bottom of "data"
>un-readable and thus fix the problem.  The VAX has a linear address
>space (or the VM hardware makes it look that way). ... If you
>marked the bottom page non-readable, ... you couldn't read start and
>whatever else makes it into the beginning of the text space. 

This is trivial.  `ld' normally starts the text space at 0.  When
linking with the no-zero-page option, it writes a no-zero-page style
magic number, and starts the text space at CLBYTES.  (It might be
safest to start at, say, 8K rather than 1K, in case someone tries
recompiling the kernel with a CLSIZE of more than 2.  Not that this
works in 4.2 and 4.3 BSD; someone confused CLBYTES and MCLBYTES, among
other things.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list