Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2003 21:16:22 +0200
From:      Pawel Jakub Dawidek <nick@garage.freebsd.pl>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: VM problem...
Message-ID:  <20030721191622.GC43543@garage.freebsd.pl>
In-Reply-To: <200307211903.h6LJ3xrX027536@apollo.backplane.com>
References:  <20030720235759.GJ437@garage.freebsd.pl> <20030721181805.GA43543@garage.freebsd.pl> <200307211903.h6LJ3xrX027536@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030721191622.GC43543>