From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 22 06:58:02 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2AFC16A400 for ; Mon, 22 Jan 2007 06:58:01 +0000 (UTC) (envelope-from pranav.sawargaonkar@gmail.com) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.234]) by mx1.freebsd.org (Postfix) with ESMTP id 702B913C469 for ; Mon, 22 Jan 2007 06:58:01 +0000 (UTC) (envelope-from pranav.sawargaonkar@gmail.com) Received: by hu-out-0506.google.com with SMTP id 38so435627huc for ; Sun, 21 Jan 2007 22:57:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=KLA22fx84ZfpgF5yXyLL/kNlD/Ijxv+cAp4N1iCFl97emAAeeiRJy3Y82rZG7jcWWn7XOndEWbrQbuNbV6DTOTGjbx4K7CwVE6/8FMFzb6E2TKjCY/e9CQVQwuX6CMiqdWQ2D8Hjj3hOZDgDHauMklbo9s7hmsy1IziLuMISne4= Received: by 10.82.113.6 with SMTP id l6mr6032281buc.1169449079366; Sun, 21 Jan 2007 22:57:59 -0800 (PST) Received: by 10.78.122.5 with HTTP; Sun, 21 Jan 2007 22:57:59 -0800 (PST) Message-ID: <5007e1a40701212257m6f6f51b8w6f15040e88a9080e@mail.gmail.com> Date: Mon, 22 Jan 2007 12:27:59 +0530 From: "Pranav Sawargaonkar" To: freebsd-hackers@freebsd.org In-Reply-To: <5007e1a40701212257q37d0c641u5e368464a3068612@mail.gmail.com> MIME-Version: 1.0 References: <45B4308B.7050608@andrew.cmu.edu> <5007e1a40701212257q37d0c641u5e368464a3068612@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Fwd: Creating a "new" virtual address space for a process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 06:58:02 -0000 ---------- Forwarded message ---------- From: Pranav Sawargaonkar Date: Jan 22, 2007 12:27 PM Subject: Re: Creating a "new" virtual address space for a process To: Joe Damato On 1/22/07, Joe Damato wrote: > > Hello - > > >This is my first time posting to the list, so please let me know if I > >should expand on anything I mention here. I am working on the S4OS > >project for FreeBSD with a couple friends and we are currently trying to > >understand how to use the VM system in FreeBSD. > > >We have a process, (in this case it happens to be curproc or proc0), and > >we would like to create a new virtual address space and allocate, say N > >pages starting at address X. To allocate new vmspace and vm_map you can use vmspace_fork() defined in vm/vm_map.c. We have been reading the fork() code to try > >to see how this would work, but got lost in some of the COW stuff. > > >We have some kernel data that needs to be copied out to userland, but we > >can't seem to figure out how to actually set up that virtual address > >space. I would attach a code snippet of the code we wrote to accomplish > >this, but it is literally all guess work, and probably completely wrong. > >Anyone know how to do this or even where to look to see an example of > >this happening? > > >Thanks, > >Joe > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to " freebsd-hackers-unsubscribe@freebsd.org > " >