Unix Technical Forum

Re: UVM - why no user process submaps? [OpenBSD/TECH]

This is a discussion on Re: UVM - why no user process submaps? [OpenBSD/TECH] within the mailing.openbsd.tech forums, part of the OpenBSD category; --> Making, drinking tea and reading an opus magnum from Jason Kim: [Charset ISO-8859-1 unsupported, filtering to ASCII...] > > ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 07:45 AM
Michael Shalayeff
 
Posts: n/a
Default Re: UVM - why no user process submaps? [OpenBSD/TECH]

Making, drinking tea and reading an opus magnum from Jason Kim:
[Charset ISO-8859-1 unsupported, filtering to ASCII...]
>
>
> Michael Shalayeff wrote:
> > that's not what submaps are made for.
> > also since you would require some sort of allocator to be written
> > anyway what is the difference wrt using shmems anyway?
> >

> [ -- cut -- ]
> > also. what NEEDS a contiguos virtual space for later
> > split in smaller allocs. what is the application is
> > that you require this for?

>
> For the most part, this is an academic exercise.


you should not read kernel code

> > why not use mmap() ?

>
> Basically, I want a vm_map_entry covering an address region to be able
> to ultimately point to a vmspace (and thus, a vm_map), which then can be
> shared with another process.
>
> Like what happens now in uvmspace_share() for rfork(), except that in
> this case, I don't want to share the entire VM space, but a possibly
> large portion of it that may or may not have gaps in them (i.e. may not
> be filled up with allocated pages)
>
> Think of the application as a monitor for virtual memory, which also
> needs direct access to the memory region.
> In other words, All this has to be transparent with respect to the
> client, but ptrace() by itself is not an option (for now).
>
> The client process will be using mmap()/shmat() for other things (like
> allocating pages for use within the shared subspace) - and I want all vm
> operations in the given VM subspace (map,unmap, etc..) to be "auditable"
> as well as direct access to the contents of the memory itself.


so you have read the mmap(2) page and you know about
MAP_INHERIT and MAP_SHARED right ?
i believe that will allow you to implement what you want
w/ some additional protocol over say a socket...

> In the end, however, the original question still stands -
> Before getting out the work-clothes for an extended uvm hacking session,
> I thought I'd ask for advice/hints..
>
> So, how difficult would it be to subvert the submap mechanism for this
> purpose? If anyone has advice/hints to give, I'd appreciate it very much.


there is existing mechanism to implement what you want
over fork or exec w/o any additional kernel api.

cu

--
paranoic mickey (my employers have changed but, the name has remained)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:18 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com