From owner-freebsd-hackers Wed Jun 4 09:03:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA06868 for hackers-outgoing; Wed, 4 Jun 1997 09:03:19 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id JAA06862 for ; Wed, 4 Jun 1997 09:03:17 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id IAA18658; Wed, 4 Jun 1997 08:55:44 -0700 From: Terry Lambert Message-Id: <199706041555.IAA18658@phaeton.artisoft.com> Subject: Re: Virtual address question for VM guru's To: PBozeman@lbl.gov Date: Wed, 4 Jun 1997 08:55:44 -0700 (MST) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: from "Pat Bozeman" at Jun 3, 97 09:36:38 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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.