Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2001 14:27:40 +0000 (GMT)
From:      "E.B. Dreger" <eddy+public+spam@noc.everquick.net>
To:        freebsd-hackers@freebsd.org
Subject:   need help: mmap() / vm_map_stack()
Message-ID:  <Pine.LNX.4.20.0103021411210.12311-100000@www.everquick.net>

next in thread | raw e-mail | index | archive | help
Greetings,

This is something of a repost of an earlier question, but in a different
vein.  I should mention that I'm using 4.2-R.

Has anyone modified vm_map_stack(), in /usr/src/sys/vm/vm_map.c, to search
for the first suitable open block?

I tried modifying vm_map_stack() based on vm_map_find(), but get:

* kernel panic upon boot ("Bad entry start/end for new stack entry")
* kernel panic when attempting to search for a block using mmap(MAP_STACK)
* _duplicate_ values returned when searching using mmap(MAP_STACK)

depending upon the exact code that I tried.  I know that the first two
symptoms are when I made a fubar vm_map_stack().  I'm rather new to the
kernel code, so I'm sure that I'm doing something wrong...

For the last problem, I made certain that I had vm_map_lock()'ed, ran at
splvm()... same thing.  I then sleep()'ed between mmap() calls... same
thing.

I've concluded that I need to learn more about vm_map_entry_t and friends,
but wanted to see if anyone had any suggestions before I went chasing the
wrong thing...

I'm almost tempted to try having vm_map_stack() call vm_map_find() with
size SGROWSIZ, shrink it to the initial size, then alter vm_map_entry_t
entries as needed based upon current vm_map_stack() code.

Advice?  Just keep digging? :-)


Eddy

---------------------------------------------------------------------------

Brotsman & Dreger, Inc.
EverQuick Internet / EternalCommerce Division

E-Mail: eddy@everquick.net
Phone: (316) 794-8922

---------------------------------------------------------------------------


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?Pine.LNX.4.20.0103021411210.12311-100000>