tech-kern archive

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

Re: compat linux SIOCGIFCONF fix for 64bit archs



On Mon, Jun 30, 2008 at 07:20:52PM +0200, Nicolas Joly wrote:
> 
> Hi,
> 
> Here follow a patch that fix SIOCGIFCONF ioctl under compat linux for
> 64bits archs.
> 
> The main problem, here, is that Linux `struct ifreq' is not MI, but
> our is ... By example, on Linux/x86_64 use a 40 bytes structure but
> our corresponding structure has only 32 bytes (this works on i386,
> because the Linux structure size is 32 bytes). This difference will
> lead to an alignment problem when reporting the interfaces list with
> SIOCGIFCONF ioctl.
> 
> To fix it, i added a new `struct linux_ifreq' which has the expected
> size, and a new linux_getifconf() function that use it (a cleaned up
> version of compat_ifconf()).

this is mostly what FreeBSD does... I believe you can copy some more
code from us :)

btw: any progress with the futexes?

roman


Home | Main Index | Thread Index | Old Index