From owner-freebsd-questions Wed Oct 23 00:02:14 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA28932 for questions-outgoing; Wed, 23 Oct 1996 00:02:14 -0700 (PDT) Received: from gatekeeper.barcode.co.il (gatekeeper.barcode.co.il [192.116.93.17]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id AAA28925 for ; Wed, 23 Oct 1996 00:02:09 -0700 (PDT) Received: (from smap@localhost) by gatekeeper.barcode.co.il (8.7.5/8.6.12) id JAA23676; Wed, 23 Oct 1996 09:00:30 +0200 (IST) X-Authentication-Warning: gatekeeper.barcode.co.il: smap set sender to using -f Received: from localhost.barcode.co.il(127.0.0.1) by gatekeeper.barcode.co.il via smap (V1.3) id sma023674; Wed Oct 23 09:00:03 1996 Message-ID: <326DC24D.5EAA@barcode.co.il> Date: Wed, 23 Oct 1996 08:59:25 +0200 From: Nadav Eiron X-Mailer: Mozilla 3.0 (X11; I; SunOS 5.5 sun4m) MIME-Version: 1.0 To: johnson@charming.nrtc.northrop.com CC: questions@FreeBSD.ORG Subject: Re: Virtual memory question: map first page? References: <9610230515.AA02752@charming.nrtc.northrop.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk johnson@charming.nrtc.northrop.com wrote: > > I noticed that in imgact_aout.c the text segment gets mapped starting at > linear address 4096. > > Is it possible to map the first page of linear memory? What I would like > to be able to do is set up a process in which linear addresses starting > at 0 are mapped. Most OS's don't map the first page of memory. The reason is that many bugs are caught that way. If you dereference a NULL pointer you'll find yourself in the first page of memory. Not mapping that would mean that you'll get a signal for that. Why would you care so much for the first page of virtual address space? > > When I modified imgact_aout.c to map the first linear page of memory as > an experiment, and then ran a specially cooked executable to exercise that > code, the machine immediately hung. Don't know, but it's not a good idea. > > Is there something special on the first linear page of a user process? > > Thanks, > > Greg Johnson > johnson@nrtc.northrop.com Nadav