From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 21 12:16:07 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3166537B404 for ; Mon, 21 Jul 2003 12:16:07 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7F5A43F3F for ; Mon, 21 Jul 2003 12:16:04 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 1C5E03ABB53; Mon, 21 Jul 2003 21:16:22 +0200 (CEST) Date: Mon, 21 Jul 2003 21:16:22 +0200 From: Pawel Jakub Dawidek To: Matthew Dillon Message-ID: <20030721191622.GC43543@garage.freebsd.pl> References: <20030720235759.GJ437@garage.freebsd.pl> <20030721181805.GA43543@garage.freebsd.pl> <200307211903.h6LJ3xrX027536@apollo.backplane.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="Y5rl02BVI9TCfPar" Content-Disposition: inline In-Reply-To: <200307211903.h6LJ3xrX027536@apollo.backplane.com> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-hackers@freebsd.org Subject: Re: VM problem... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 19:16:07 -0000 --Y5rl02BVI9TCfPar Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 21, 2003 at 12:03:59PM -0700, Matthew Dillon wrote: +> Hmm. Is the VM object properly sized? Any attempt to fault-in data +> beyond a VM object's EOF, regardless of how you set the map_entry +> permissions, will seg fault or bus fault. I'm allocationg memory with obreak() function (so vm_map_find() function is used to find space). But if I try to allocate size (and size is small), obreak() will allocate more memory. end =3D vm->vm_daddr + ctob(vm->vm_dsize); obreak(vm, end + size); vm_map_protect(&vm->vm_map, end, end + size, VM_PROT_READ); And vm_map_protect() will create new map entry (it should, right?) with entry->start =3D end and entry->end =3D end + size. But what happend with those entries when execve() is called? Because process' map catched before execve() doesn't exists after execve() is called. So maybe those entries (with VM_PROT_READ) are reused somehow? THANKS! --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --Y5rl02BVI9TCfPar Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPxw8Bj/PhmMH/Mf1AQHbFAQAht6f+snT/al5hUyaIYiX/xQ/uiuqCCJX niBwcuLkoRN3nKWY8kIQs2OPuDAhjFK9Ffr92VL/5Im5fJW7Uj/BmKppECAjnwxm Hz6FrkIfT9SZnwcusrHJsrsnDtsmL/BcfEv54jSjYO1b9zadWGajOE25xdhOAS/z ATu/kaSbSNQ= =LHzU -----END PGP SIGNATURE----- --Y5rl02BVI9TCfPar--