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

Re: [BusyBox] PATCH, please apply: busybox for m68k broken



On Fri, Jun 08, 2001 at 01:46:41PM +0100, Richard Hirst wrote:
> Debian boot-floppies for m68k hang in init on bootup.  This is because
> of a change in size of struct sysinfo between 2.2 and 2.4 kernels.
> Only a problem on m68k, because it aligns 32 bit words to 16 bit
> boundaries.  Basically, the struct has some padding which is supposed
> to make it 64 bytes long.  For 2.2 kernels it did, but then someone
> added more fields and reduced the padding such that it is 64 bytes
> on most platforms but 62 bytes on m68k.
> 
> busybox has its own copy of struct sysinfo, taken from a 2.4
> kernel, but I am running busybox under a 2.2 kernel.  busybox calls
> sysinfo() expecting 62 bytes, but gets 64 bytes, which trashes the
> stack and hangs init.
> 
> I have applied the following patch to my busybox source, which fixes
> the problem.

Thanks.  I've committed it to BusyBox upstream.  Erik, can we do
another BusyBox Debian package?  With just this patch?

Matt

Index: libbb/libbb.h
===================================================================
RCS file: /var/cvs/busybox/libbb/libbb.h,v
retrieving revision 1.38
diff -u -r1.38 libbb.h
--- libbb/libbb.h	2001/06/01 21:47:15	1.38
+++ libbb/libbb.h	2001/06/08 13:54:39
@@ -190,6 +190,7 @@
 	unsigned long totalswap;	/* Total swap space size */
 	unsigned long freeswap;		/* swap space still available */
 	unsigned short procs;		/* Number of current processes */
+	unsigned short pad;			/* Padding needed for m68k */
 	unsigned long totalhigh;	/* Total high memory size */
 	unsigned long freehigh;		/* Available high memory size */
 	unsigned int mem_unit;		/* Memory unit size in bytes */



Reply to: