Date: Thu, 11 Jan 2001 21:46:07 -0500 From: spectre <ai32@drexel.edu> To: Zhiui Zhang <zzhang@cs.binghamton.edu> Cc: John Polstra <jdp@polstra.com>, hackers@freebsd.org Subject: Re: Process virtual memory question Message-ID: <20010111214607.A5230@reddog.yi.org> In-Reply-To: <Pine.SOL.4.21.0101111352290.24593-100000@jade>; from zzhang@cs.binghamton.edu on Thu, Jan 11, 2001 at 02:03:27PM -0500 References: <200101111742.f0BHgMt10004@vashon.polstra.com> <Pine.SOL.4.21.0101111352290.24593-100000@jade>
next in thread | previous in thread | raw e-mail | index | archive | help
> Thanks. It just occurs to me that Linux kernel used to have something > like this in routine BUG(): > > * ((char *) 0) = 0; > > It is called when there is a kernel bug. So address 0 should not be > mapped writable, otherwise all C statements " char * p = NULL; * p = > value; " would be legal. > > The book "Unix Internals - A Practical Approach" by S.D. Pate has a figure > showing in ELF format, the stack lies BELOW the code segment and grows > downwards. This might have something to do with code starting from > 0x8048000. > Also remember that for CPUs with virtually indexed caches, base addresses for text, data, and stack matter a great deal. Perhaps this is a remanence? For reference, see: "UNIX Systems for Modern Architectures" by Curt Schimmel, chapter 7. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010111214607.A5230>