From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 1 16:34:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67413106567B for ; Mon, 1 Dec 2008 16:34:28 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.190]) by mx1.freebsd.org (Postfix) with ESMTP id E45A68FC24 for ; Mon, 1 Dec 2008 16:34:27 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by gv-out-0910.google.com with SMTP id n8so368525gve.39 for ; Mon, 01 Dec 2008 08:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:reply-to:mail-followup-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=/W2LLvlFYp4Nu2+oDta+ChesfzUSPN8G8Xq0dGee7Io=; b=kVvUJTrlHyuBM/Vs6BGHbloU8bTRo91/PfWo7dkyfNBNn3eKOZm+87bpIp6Z/GykwX +/jAvsfPgivNSeSf15Ha66/4+xyTZDgLal0w0ZZKFRIt2tTbPF2zODaa3WC1JjBk3WEZ QUsPtH8qNo+BA+YXliiMm1BQNcwAK5hLtfYY8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; b=wDstqn+d7mUowvb+C37H1E+mMRY9V9qOa8mz5nHXUNh9QOihvE+P9rRG5qhTGTPT0O qAACo3k1HFnC/IOupRTuVvgDISgSF8vmNCK2rEpk4rLyKJKFPIixsww/utZblPOXaEj9 C5JLfQwdMlpItLVWFKh6GorVpSyP+k52pxJI8= Received: by 10.86.79.19 with SMTP id c19mr6466160fgb.26.1228149266521; Mon, 01 Dec 2008 08:34:26 -0800 (PST) Received: from localhost (BAJ4686.baj.pppool.de [77.137.70.134]) by mx.google.com with ESMTPS id 4sm1084336fge.50.2008.12.01.08.34.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Dec 2008 08:34:25 -0800 (PST) Date: Mon, 1 Dec 2008 17:33:54 +0100 From: Alexej Sokolov To: freebsd-hackers@freebsd.org Message-ID: <20081201163354.GA5282@debian.samsung.router> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20081201013851.GA20549@debian.samsung.router> <20081201101232.42d55473@kan.dnsalias.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20081201101232.42d55473@kan.dnsalias.net> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: remapping kernel buffer in VMS of user process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexej Sokolov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 16:34:28 -0000 On Mon, Dec 01, 2008 at 10:12:09AM -0500, Alexander Kabaev wrote: > On Mon, 1 Dec 2008 02:38:51 +0100 > Alexej Sokolov wrote: > > > Hello, > > > > I would like to remap some buffers allocated in kernel space to memory > > space of certain process. > > > The simplest way is to expose this buffer through device pager. > Implement the driver callback and let userland to simply mmap the page. > Sorry, but I don't understand how to do it. I know how to implement mmap through character device. But I am working with network driver. Network devices doesn't appear in file system and they don't have any interface for mmaping. I think I can try to solve with task with: vm_map_lookup - to get a vm_object of allocated space and then vm_map_find (map_of_process, ... founded_object ...) - allocate a new space in the vms of process. I try to do it now with a small hope of success :-) > -- > Alexander Kabaev -- Alexej Sokolov