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 = 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 = end and entry->end = 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!

-- 
Pawel Jakub Dawidek                       [EMAIL PROTECTED]
UNIX Systems Programmer/Administrator     http://garage.freebsd.pl
Am I Evil? Yes, I Am!                     http://cerber.sourceforge.net

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to