Return to BSD News archive
Newsgroups: comp.os.386bsd.bugs Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!olivea!decwrl!pa.dec.com!e2big.mko.dec.com!decvax.dec.com!jtkohl From: jtkohl@zk3.dec.com (John Kohl) Subject: Re: Catching References to address 0 In-Reply-To: wjolitz@soda.berkeley.edu's message of 14 Jun 1993 17:37:24 GMT Message-ID: <1993Jun14.190638.424@e2big.mko.dec.com> Sender: usenet@e2big.mko.dec.com (Mr. USENET) Organization: Digital Equipment Corporation References: <1vid0k$p4n@agate.berkeley.edu> Date: Mon, 14 Jun 1993 19:06:38 GMT Lines: 21 In article <1vid0k$p4n@agate.berkeley.edu> wjolitz@soda.berkeley.edu (William F. Jolitz) writes: > May I suggest a different approach. Don't rush to change the kernel > when you can exploit the features of user mode to the same end. Here's > an example: > [using mprotect from crt0.c to unmap page zero] However, this way of unmapping page zero has the unfortunate side effect of consuming more disk space for the binaries (the .space 4096 ends up being useless bytes on the disk). That's one advantage of the QMAGIC format: since the a.out header is mapped into the address space, there's no one-page "gap" of worthless bytes on your executable image. I don't have the time to work it out at the moment, but perhaps there's a way to arrange the loader and crt0 to unmap page zero, and not require wasted space in the on-disk executable format? -- John Kohl <jtkohl@zk3.dec.com> or <jtkohl@mit.edu> working for but not representing: Digital Equipment Corporation Member of the League for Programming Freedom---get details: lpf@uunet.uu.net (The above opinions are MINE. Don't put my words in somebody else's mouth!)