Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Need advise about linux32 on amd64



On Fri, Jun 20, 2008 at 12:52:12PM +0300, Cem Kayali wrote:
> 
> Hi,
> 
> Thank you, but fix for 'SIOCGIFCONF' didn't work. Output is the same.

Yes. I had a quick look, and SIOCGIFCONF ioctl is currently broken on
amd64 for both compat linux and linux32 ...

For 64bit compat linux, this is an alignment problem. Linux define an
ifreq struct which size differs on different arch (32 bytes on i386,
but 40 bytes on x86_64), but our needed corresponding structure is MI,
with a size of 32 bytes ...

As for linux32, the problem is burried in compat netbsd32 where
*SIOCGIFCONF ioctls handling looks wrong. It does not follow the
native definitions ... And is missing OOSIOCGIFCONF currently needed
by linux compat.

njoly@petaure [src/sys]> grep SIOCGIFCONF sys/* compat/sys/*                    
sys/sockio.h:#define    SIOCGIFCONF     _IOWR('i', 38, struct ifconf)   /* get 
ifnet list */
compat/sys/sockio.h:#define     OOSIOCGIFCONF    _IOWR('i', 20, struct ifconf)  
/* get ifnet list */
compat/sys/sockio.h:#define     OSIOCGIFCONF     _IOWR('i', 36, struct ifconf)  
/* get ifnet list */

njoly@petaure [src/sys]> grep SIOCGIFCONF compat/netbsd32/*.h             
compat/netbsd32/netbsd32_ioctl.h:#define        OSIOCGIFCONF32  _IOWR('i', 20, 
struct netbsd32_ifconf)  /* get ifnet list */
compat/netbsd32/netbsd32_ioctl.h:#define        SIOCGIFCONF32   _IOWR('i', 36, 
struct netbsd32_ifconf)  /* get ifnet list */

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.


Home | Main Index | Thread Index | Old Index