Subject: Re: 64-bit sysinfo

From: [email-masked] (Tor Arntsen)
Date: Thu, 12 Jun 2003 13:19:29 +0200

On Jun 12, 12:05, Trevor Woerner wrote:
[...]
>I compiled a 64-bit MIPS kernel, then built a busybox-based ramdisk. At 
>first I couldn't get busybox's 'init' to work but later solved it by 
>disabling the 'check_memory()' call.
>
>Further investigation into why the 'check_memory()' call was failing 
>revealed a problem with the 'sysinfo()' system call. The kernel is 
>64-bit, therefore when it fills in the 'struct sysinfo' (as it does 
>when 'sys_meminfo()' is called) unsigned int's are 64 bits. But back in 
>userspace, the 'struct sysinfo' that gets allocated thinks that 
>unsigned int's are 32 bits.
[...]

Hm, that sounds wrong to me. 'int' is supposed to be 32 bits also on
64-bit systems, only 'long' should be 64 bits.

-Tor

---

From: Trevor Woerner <[email-masked]>
Date: Thu, 12 Jun 2003 08:04:47 -0400

> 64-bit systems, only 'long' should be 64 bits.

Right, sorry. That was suppsed to read long. In any case, I put 'printk' 
where the calls are being made as printed out the sizeof() of the 
values and discovered that in user space they're 32 bits and in the 
kernel they're 64 bits.

	Trevor