WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] don't use mlock() with Solaris tools

To: veillard@xxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] don't use mlock() with Solaris tools
From: "Mark Johnson" <johnson.nh@xxxxxxxxx>
Date: Fri, 20 Oct 2006 16:11:30 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, John Levon <levon@xxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 21 Oct 2006 03:55:22 -0700
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mEEddvSLpQY2WjPOdBl8nlq5pOo0AKIS4Ei4P6fQIIkHxbhnQ6WIJT+fIy1RRCVznfkudnIii0cbNFf91JsYK5OLKtuR7UMWgW+9VH8uZ69E8YHF0Kr1NbrdUDbVY7o9XulEuU22skVAh++25h45amQ5hWd9OwAIQu+GzI0OnmI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061020223527.GC28613@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20061020034247.GB4480@xxxxxxxxxxxxxxxxxxxx> <20061020223527.GC28613@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 10/20/06, Daniel Veillard <veillard@xxxxxxxxxx> wrote:
On Fri, Oct 20, 2006 at 04:42:47AM +0100, John Levon wrote:
> on solaris: mlock requires a page aligned address and mlock doesn't ensure 
the pages won't minor page fault; so don't use it on solaris.
[...]
> -/* NB: arr must be mlock'ed */
> +int lock_pages(void *addr, size_t len)
> +{
> +      int e = 0;
> +#ifndef __sun__
> +      e = mlock(addr, len);
> +#endif
> +      return (e);
> +}
> +
> +void unlock_pages(void *addr, size_t len)
> +{
> +#ifndef __sun__
> +     safe_munlock(addr, len);
> +#endif
> +}
> +

  So on Solaris you don't pin down the memory used for hypercall parameters
and results at all ? Is there really no risk associated with this strategy ?

  surprised,

We have to pin it down in the privcmd driver. There is no way to
ping the memory from a user app.


MRJ

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel