Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jun 1997 08:55:44 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        PBozeman@lbl.gov
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Virtual address question for VM guru's
Message-ID:  <199706041555.IAA18658@phaeton.artisoft.com>
In-Reply-To: <Pine.SOL.3.95.970603211241.23254C-100000@george.lbl.gov> from "Pat Bozeman" at Jun 3, 97 09:36:38 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I am working on a project where I need to access the address space of a
> process when the process is not necessarily the current process.  I am
> working on a device driver which requires that I copy data directly into
> any writable region in the processes address space.  The user informs the
> kernel of the address range which is then verified and wired before any
> such transfers take place.  This _almost_ all works, if the process is not
> active at the time the device driver attempts to write to the buffer the
> virtual address is giberish.

Pipe buffers work this way, but I believe there will be a copy involved;
if you want to avoid the copy, the best suggestion I can give you is to
use a shared memory region as your target buffer.

A shared memory region is also more sane in that it establishes an
agreement between the process and the driver about memory the driver
is permitted to spam.

Since you need to establish this memory region anyway, and it must be
on page boundries, it might as well be a shared memory segment.


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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