From: Keir Fraser Subject: Re: user/hypervisor address space solution Date: Tue, 14 Feb 2006 10:29:28 +0000 Message-ID: <2f3d4d6446f61cbff7006118a9d11706@cl.cam.ac.uk> References: <1139283935.13776.71.camel@localhost.localdomain> <1139871396.8407.124.camel@localhost.localdomain> <1139875607.8407.133.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1139875607.8407.133.camel@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Hollis Blanchard Cc: Dan Magenheimer , Jimi Xenidis , xen-devel , Stefan Berger , Reiner Sailer List-Id: xen-devel@lists.xenproject.org On 14 Feb 2006, at 00:06, Hollis Blanchard wrote: > Ok, so what I'm hearing is that copy_to/from_user() and get/put_user() > should take unsigned long and not void*. I'd prefer a type that can't be directly manipulated by standard operators. In fact, a family of types that would allow us to differentiate between references to different types (e.g., unsigned long * versus multicall_entry_t *). Perhaps replace 'foo *name' in public structures with 'XENPARM_HANDLE(foo, name)'. The uaccess macros then take xenparm handles plus an offset. The macros would need a bit of CPP magic to make them suitably polymorphic. -- Keir