On 02/23/2011 10:20 AM, Daniel P. Berrange wrote: > Using the 'personality(2)' system call, we can make a container > on an x86_64 host appear to be i686. Likewise for most other > Linux 64bit arches. > > * src/lxc/lxc_conf.c: Fill in 32bit capabilities for x86_64 hosts > * src/lxc/lxc_container.h, src/lxc/lxc_container.c: Add API to > check if an arch has a 32bit alternative > * src/lxc/lxc_controller.c: Set the process personality when > starting guest > @@ -73,7 +75,7 @@ virCapsPtr lxcCapsInit(void) > if ((guest = virCapabilitiesAddGuest(caps, > "exe", > utsname.machine, > - sizeof(int) == 4 ? 32 : 8, > + sizeof(void*) == 4 ? 32 : 64, How long have we had that bug? Thankfully, sizeof(int) is 4 on both 32-bit and 64-bit Linux, so we were never setting 8 as the number of bits per CPU word. This fix alone is worth the patch. ACK. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list