sys32_sysinfo broken on mips64 and ia64
PATCH 1/1 sys32_sysinfo broken on mips64 and ia64
Hi all,
The sys32_sysinfo() calls are currently using an old version of "struct sysinfo32", in both the mips64 and ia64 ports.
busybox's init can't cope with the bogus output on my Origin 200, so this bug prevents the Debian installer from bootstrapping.
This is the mips64 version of the patch. A very similar patch could be constructed for ia64... it's very obvious what to do, so I'll leave it to you ia64 people :)
Cheers,
Andrew
mips64/kernel/linux32.c +8 -2
@@ -672,8 +672,11 @@u32 bufferram;u32 totalswap;u32 freeswap; -unsigned short procs; -char _f[22 ]; +u16 procs; +u32 totalhigh; +u32 freehigh; +u32 mem_unit; +char _f[8 ]; }; extern asmlinkage int sys_sysinfo(struct sysinfo *info);
@@ -698,6 +701,9 @@ err |=__put_user (s.totalswap, &info->totalswap); err |=__put_user (s.freeswap, &info->freeswap); err |=__put_user (s.procs, &info->procs); + err |=__put_user (s.totalhigh, &info->totalhigh); + err |=__put_user (s.freehigh, &info->freehigh); + err |=__put_user (s.mem_unit, &info->mem_unit);if (err)return -EFAULT ;return ret;
Quoted 2 lines
The
sys32_sysinfo()calls are currently using an old version of "struct sysinfo32", in both the mips64 and ia64 ports.
Thanks, Andrew.
David, I applied the following patch to 2.4. It looks like 2.5 needs the same thing.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1013 -> 1.1014
# arch/ia64/ia32/sys_ia32.c 1.14 -> 1.15
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/03/04 [email protected] 1.1014
# ia64: sys32_sysinfo: update to current struct sysinfo (add totalhigh, # freehigh, mem_unit).
# --------------------------------------------
#
arch/ia64/ia32/sys_ia32.c +8 -2
@@ -3707,8 +3707,11 @@u32 bufferram;u32 totalswap;u32 freeswap; -unsigned short procs; -char _f[22 ]; +u16 procs; +u32 totalhigh; +u32 freehigh; +u32 mem_unit; +char _f[8 ]; };asmlinkage long
@@ -3737,6 +3740,9 @@ err |=__put_user (s.totalswap, &info->totalswap); err |=__put_user (s.freeswap, &info->freeswap); err |=__put_user (s.procs, &info->procs); + err |=__put_user (s.totalhigh, &info->totalhigh); + err |=__put_user (s.freehigh, &info->freehigh); + err |=__put_user (s.mem_unit, &info->mem_unit);if (err)return -EFAULT ;return ret;
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line · Bjorn Helgaas
The
sys32_sysinfo()calls are currently using an old version of "struct sysinfo32", in both the mips64 and ia64 ports.
Bjorn> Thanks, Andrew.
Bjorn> David, I applied the following patch to 2.4. It looks like 2.5 needs Bjorn> the same thing.
I did the same thing, just 10 minutes ago, except I made the padding explicit, like it's done in kernel.h.
--david