Revisiting an old losetup bug (bug 609)

Denis Vlasenko vda.linux at googlemail.com
Fri Feb 2 20:17:30 UTC 2007


On Friday 02 February 2007 18:24, Cross, Matthew wrote:
> In my case, I'm using a "BSP" provided by Freescale for this chip.  They
> provide a pre-built toolchain (binutils, gcc, glibc).  When the
> toolchain was built, kernel headers from a 2.6.11 kernel were used by
> glibc.  The kernel that is running on the board is a heavily patched
> 2.4.20 kernel.  Therefore, when libbb/loop.c is compiled it sees a 2.6
> kernel, and so uses LOOP_GET_STATUS64 for BB_LOOP_GET_STATUS - note that
> this is ioctl 0x4c05 (if you look in the strace output in the log of bug
> 609 you see this ioctl there, so it looks like the original submitter
> had a similar problem).  However, the loop driver in 2.4 kernels does
> not support the 64 bit variants of these ioctl's, only the 32 bit
> LOOP_GET_STATUS (which is 0x4c03).  When I hack loop.c to use the 2.4
> version of the code, it works on my system properly, so clearly the 2.4
> kernel supports the loop device fine.
>  
> Busybox could be modified to work in this scenario by trying the 32 bit
> version of the ioctl if the 64 bit version fails, but I don't know if
> that goes against the low-bloat philosophy of busybox.

It depents on the amount of bloat. If it is something like 32 bytes
it's ok. If significantly bigger, maybe create a CONFIG_xxx for it,
or sweep it under CONFIG_DESKTOP if you are lazy.

Please, by all means, send your patch to list. Thanks.
--
vda



More information about the busybox mailing list