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] 32/64-bit hypercall interface

On Sep 30, 2005, at 11:44 AM, David wrote:
I think the Linux kernel folks learned the "unsigned long" lesson too late, and now there is quite a lot of fixup code to convert 32-bit userspace structs to 64-bit kernel structs (have a look at linux/fs/compat_ioctl.c and compat.c). It seems a shame to repeat the same mistakes in Xen...

Quick question.... What is this "'unsigned long' lesson" you are refering to?

"long" has the unfortunate tendency to change size between 32- and 64-bit compiles, like a pointer. So if you put that in a structure, the structure's layout will change between 32- and 64-bit builds. When you make that structure part of the userland/kernel ABI, you will have problems on architectures that can run both 32- and 64-bit binaries, which include PowerPC, MIPS, x86-64, Sparc, and possibly S390 and even IA64.

--
Hollis Blanchard
IBM Linux Technology Center


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