Linux-kernel mailing list archive 1999-36,: Re: Bug#44654: dpkg: seg faults w/2.3.17; problem traced to sysinfo() call

# Re: Bug#44654: dpkg: seg faults w/2.3.17; problem traced to sysinfo() call

Simon Kirby (sim@netnation.com)
Thu, 9 Sep 1999 18:36:44 -0400

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: The Doctor What: "Re: 2.2.12: serial driver swapping characters?"
- Previous message: Andrea Arcangeli: "Re: [patch] longstanding chksum patch"
- In reply to: Chris Lawrence: "Bug#44654: dpkg: seg faults w/2.3.17; problem traced to sysinfo() call"
- Next in thread: Simon Kirby: "Re: Bug#44654: dpkg: seg faults w/2.3.17; problem traced to sysinfo() call"

On Thu, Sep 09, 1999 at 04:56:13AM -0500, Chris Lawrence wrote:

> dpkg under my self-compiled Linux 2.3.17 seg faults on startup if a
> non-dpkg-deb option is given. The problem is avoided if the call to
> sysinfo() in main/filesdb.c is bypassed. I can't see what's going
> wrong (it's probably something in kernel space clobbering user space,
> but the code seems fine and probably hasn't changed in a while).

Me Too (tm).

I had read the 2.3.17 patch beforehand and some neurons in my brain
connected and made me think of this part of the 2.3.17 patch being the
culprit:

diff -urN linux-pre1/include/linux/kernel.h linux/include/linux/kernel.h
--- linux-pre1/include/linux/kernel.h Tue Aug 31 14:17:19 1999
+++ linux/include/linux/kernel.h Tue Sep 7 18:08:32 1999
@@ -91,11 +91,12 @@
unsigned long freeram; /* Available memory size */
unsigned long sharedram; /* Amount of shared memory */
unsigned long bufferram; /* Memory used by buffers */
- unsigned long totalbig; /* Total big memory size */
- unsigned long freebig; /* Available big memory size */
unsigned long totalswap; /* Total swap space size */
unsigned long freeswap; /* swap space still available */
unsigned short procs; /* Number of current processes */
+ unsigned long totalbig; /* Total big memory size */
+ unsigned long freebig; /* Available big memory size */
+ char _f[22-2*sizeof(long)]; /* Padding: libc5 uses this.. */
};
#endif

...Not sure what the original point of this patch is, but reversing it
makes things work agian.

Simon-

| Simon Kirby | Systems Administration |
| mailto:sim@netnation.com | NetNation Communications |
| http://www.netnation.com/ | Tech: (604) 684-6892 |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: The Doctor What: "Re: 2.2.12: serial driver swapping characters?"
- Previous message: Andrea Arcangeli: "Re: [patch] longstanding chksum patch"
- In reply to: Chris Lawrence: "Bug#44654: dpkg: seg faults w/2.3.17; problem traced to sysinfo() call"
- Next in thread: Simon Kirby: "Re: Bug#44654: dpkg: seg faults w/2.3.17; problem traced to sysinfo() call"