From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 30 20:04:01 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCD6216A4E1 for ; Sun, 30 Jul 2006 20:04:01 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35BE543D46 for ; Sun, 30 Jul 2006 20:04:00 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k6UK3s9m082669 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 30 Jul 2006 22:03:54 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k6UK3sRi082667 for hackers@freebsd.org; Sun, 30 Jul 2006 22:03:54 +0200 (CEST) Date: Sun, 30 Jul 2006 22:03:54 +0200 From: Divacky Roman To: hackers@freebsd.org Message-ID: <20060730200354.GA82547@stud.fit.vutbr.cz> References: <20060730105731.GA64955@stud.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060730105731.GA64955@stud.fit.vutbr.cz> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: Subject: Re: VM question related to faults 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: Sun, 30 Jul 2006 20:04:01 -0000 On Sun, Jul 30, 2006 at 12:57:32PM +0200, Divacky Roman wrote: > hi, > > while working on SoC linuxolator project I am in a need of this: > > I need to do some operation on memory like mem1 = mem1 + mem2 etc. > where the mem1/mem2 access can trigger fault. (memory not mapped or something) to make it clear.. I am trying to access user-space memory from kernel. This needs to be atomic (its an implementation of linux futexes) I need to check from kernel if some memory is accessible and then perform an operation on this memory. All atomically. hence I need two things - function which checks wheter the memory is accessible and something which makes it atomic (some mutex/something which prevents other process to enter VM to unmap/etc. the memory in question) hope its a bit more clear now roman