* Re: [BusyBox] 0.48 - Can't mount /proc
@ 2001-01-11 7:28 ` Michael Shmulevich
0 siblings, 0 replies; 8+ messages in thread
From: Michael Shmulevich @ 2001-01-11 7:28 UTC (permalink / raw)
Cc: busybox, linux-mips@oss.sgi.com
Erik,
No, doesn't help.
bash# mount proc /proc -t proc
mount: Mounting proc on /proc failed: Unknown error 716878944
Maybe people in mips-linux know something about this?
Erik Andersen wrote:
> On Wed Jan 10, 2001 at 08:39:15PM +0200, Michael Shmulevich wrote:
>
>> Hello,
>>
>> This is my first mail to this list, but I have already seen similar
>> question being unanswered.
>> I am developing an embedded system based on MIPS board. I am
>> cross-compiling the BusyBox 0.48 on x86 with gcc 2.90.29 (egcs 1.0.3a).
>>
>> While trying to mount /proc either atomatically in script or by hand,
>> the command fails with following message:
>>
>> bash# mount /proc -t proc
>> mount: Mounting none on /proc failed: Unknown error 716878944
>
>
> mount proc /proc -t proc
>
> -Erik
>
> --
> Erik B. Andersen email: andersen@lineo.com
> --This message was written using 73% post-consumer electrons--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BusyBox] 0.48 - Can't mount /proc
@ 2001-01-11 7:28 ` Michael Shmulevich
0 siblings, 0 replies; 8+ messages in thread
From: Michael Shmulevich @ 2001-01-11 7:28 UTC (permalink / raw)
Cc: busybox, linux-mips@oss.sgi.com
Erik,
No, doesn't help.
bash# mount proc /proc -t proc
mount: Mounting proc on /proc failed: Unknown error 716878944
Maybe people in mips-linux know something about this?
Erik Andersen wrote:
> On Wed Jan 10, 2001 at 08:39:15PM +0200, Michael Shmulevich wrote:
>
>> Hello,
>>
>> This is my first mail to this list, but I have already seen similar
>> question being unanswered.
>> I am developing an embedded system based on MIPS board. I am
>> cross-compiling the BusyBox 0.48 on x86 with gcc 2.90.29 (egcs 1.0.3a).
>>
>> While trying to mount /proc either atomatically in script or by hand,
>> the command fails with following message:
>>
>> bash# mount /proc -t proc
>> mount: Mounting none on /proc failed: Unknown error 716878944
>
>
> mount proc /proc -t proc
>
> -Erik
>
> --
> Erik B. Andersen email: andersen@lineo.com
> --This message was written using 73% post-consumer electrons--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BusyBox] 0.48 - Can't mount /proc
2001-01-11 7:28 ` Michael Shmulevich
(?)
@ 2001-01-11 11:48 ` Erik Andersen
2001-01-11 12:04 ` Florian Lohoff
-1 siblings, 1 reply; 8+ messages in thread
From: Erik Andersen @ 2001-01-11 11:48 UTC (permalink / raw)
To: Michael Shmulevich; +Cc: busybox, linux-mips@oss.sgi.com
On Thu Jan 11, 2001 at 09:28:28AM +0200, Michael Shmulevich wrote:
> Erik,
>
> No, doesn't help.
>
> bash# mount proc /proc -t proc
>
> mount: Mounting proc on /proc failed: Unknown error 716878944
>
>
> Maybe people in mips-linux know something about this?
Yes, this does sound like a kernel specific problem then,
since this works on (at least) arm, ppc, sh, and x86.
I havn't tried it on anything else.
-Erik
--
Erik B. Andersen email: andersen@lineo.com
--This message was written using 73% post-consumer electrons--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BusyBox] 0.48 - Can't mount /proc
2001-01-11 11:48 ` Erik Andersen
@ 2001-01-11 12:04 ` Florian Lohoff
2001-01-11 15:52 ` Quinn Jensen
0 siblings, 1 reply; 8+ messages in thread
From: Florian Lohoff @ 2001-01-11 12:04 UTC (permalink / raw)
To: Erik Andersen; +Cc: Michael Shmulevich, busybox, linux-mips@oss.sgi.com
On Thu, Jan 11, 2001 at 04:48:08AM -0700, Erik Andersen wrote:
> On Thu Jan 11, 2001 at 09:28:28AM +0200, Michael Shmulevich wrote:
> > Erik,
> >
> > No, doesn't help.
> >
> > bash# mount proc /proc -t proc
> >
> > mount: Mounting proc on /proc failed: Unknown error 716878944
> >
> >
> > Maybe people in mips-linux know something about this?
>
> Yes, this does sound like a kernel specific problem then,
> since this works on (at least) arm, ppc, sh, and x86.
> I havn't tried it on anything else.
Henning Heinold has done a lot with busybox on mips (debian installer)
Might this be due to kernel 2.4 and /proc/mounts includeing a / in front
of proc
(flo@ping)~# cat /proc/mounts
/dev/root / ext2 rw 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sda7 /usr ext2 rw 0 0
/dev/sda8 /var ext2 rw 0 0
/dev/sda9 /tmp ext2 rw 0 0
/dev/sda10 /home ext2 rw 0 0
/dev/hda5 /var/tmp ext3 rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
automount(pid19472) /mnt autofs rw 0 0
(flo@ping)~# uname -a
Linux ping.mediaways.net 2.2.18ext3 #1 Thu Dec 14 18:24:45 CET 2000 i686 unknown
Or
flo@resume:~$ cat /proc/mounts
/dev/root / ext2 rw 0 0
/proc /proc proc rw 0 0
/dev/sdb1 /home2 ext2 rw 0 0
/dev/sdc1 /home3 ext2 rw 0 0
/dev/sdd1 /ftp.rfc822.org ext2 rw 0 0
/dev/sde1 /home4 ext2 rw 0 0
shmfs /var/shm shm rw 0 0
devpts /home4/dev/pts devpts rw 0 0
proc /home4/proc proc rw 0 0
flo@resume:~$ uname -a
Linux resume.rfc822.org 2.4.0-test6 #2 Sun Aug 27 12:37:51 GMT 2000 mips unknown
Henning has fought with this IIRC.
Flo
--
Florian Lohoff flo@rfc822.org +49-5201-669912
Why is it called "common sense" when nobody seems to have any?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BusyBox] 0.48 - Can't mount /proc
@ 2001-01-11 15:52 ` Quinn Jensen
0 siblings, 0 replies; 8+ messages in thread
From: Quinn Jensen @ 2001-01-11 15:52 UTC (permalink / raw)
To: owner-linux-mips
Cc: Erik Andersen, Michael Shmulevich, busybox,
linux-mips@oss.sgi.com
Here's a kernel patch. The __access_ok macro looks one byte
too far and fails. Since copy_mount_options() isn't
sure how long the string arguments are, it just copies
to the end of the page. Since this is on busybox's
stack, the copy wants to go all the way to 0x7FFFFFF
and hits this corner case.
Quinn Jensen
jensenq@lineo.com
--- linux-sgi-2.4.0-test11-pristine/include/asm-mips/uaccess.h Wed Oct 4 19:19:02 2000
+++ linux/include/asm-mips/uaccess.h Wed Jan 10 16:20:35 2001
@@ -46,7 +46,7 @@
* - OR we are in kernel mode.
*/
#define __access_ok(addr,size,mask) \
- (((__signed__ long)((mask)&(addr | size | (addr+size)))) >= 0)
+ (((__signed__ long)((mask)&(addr | size | (addr+size-1)))) >= 0)
#define __access_mask ((long)(get_fs().seg))
#define access_ok(type,addr,size) \
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BusyBox] 0.48 - Can't mount /proc
@ 2001-01-11 15:52 ` Quinn Jensen
0 siblings, 0 replies; 8+ messages in thread
From: Quinn Jensen @ 2001-01-11 15:52 UTC (permalink / raw)
To: owner-linux-mips; +Cc: Erik Andersen, Michael Shmulevich, busybox
Here's a kernel patch. The __access_ok macro looks one byte
too far and fails. Since copy_mount_options() isn't
sure how long the string arguments are, it just copies
to the end of the page. Since this is on busybox's
stack, the copy wants to go all the way to 0x7FFFFFF
and hits this corner case.
Quinn Jensen
jensenq@lineo.com
--- linux-sgi-2.4.0-test11-pristine/include/asm-mips/uaccess.h Wed Oct 4 19:19:02 2000
+++ linux/include/asm-mips/uaccess.h Wed Jan 10 16:20:35 2001
@@ -46,7 +46,7 @@
* - OR we are in kernel mode.
*/
#define __access_ok(addr,size,mask) \
- (((__signed__ long)((mask)&(addr | size | (addr+size)))) >= 0)
+ (((__signed__ long)((mask)&(addr | size | (addr+size-1)))) >= 0)
#define __access_mask ((long)(get_fs().seg))
#define access_ok(type,addr,size) \
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BusyBox] 0.48 - Can't mount /proc
2001-01-11 7:28 ` Michael Shmulevich
(?)
(?)
@ 2001-01-11 20:25 ` Ralf Baechle
-1 siblings, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 2001-01-11 20:25 UTC (permalink / raw)
To: Michael Shmulevich; +Cc: busybox, linux-mips@oss.sgi.com
On Thu, Jan 11, 2001 at 09:28:28AM +0200, Michael Shmulevich wrote:
> bash# mount proc /proc -t proc
>
> mount: Mounting proc on /proc failed: Unknown error 716878944
716878944 is 0x2abab460, a typical address of a shared library or malloced
memory allocated via mmap(2).
Ralf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BusyBox] 0.48 - Can't mount /proc
2001-01-11 15:52 ` Quinn Jensen
(?)
@ 2001-01-16 7:13 ` Ralf Baechle
-1 siblings, 0 replies; 8+ messages in thread
From: Ralf Baechle @ 2001-01-16 7:13 UTC (permalink / raw)
To: Quinn Jensen
Cc: Erik Andersen, Michael Shmulevich, busybox,
linux-mips@oss.sgi.com
On Thu, Jan 11, 2001 at 08:52:08AM -0700, Quinn Jensen wrote:
> Here's a kernel patch. The __access_ok macro looks one byte
> too far and fails. Since copy_mount_options() isn't
> sure how long the string arguments are, it just copies
> to the end of the page. Since this is on busybox's
> stack, the copy wants to go all the way to 0x7FFFFFF
> and hits this corner case.
I don't like this solution as it inflates the kernel noticably. Actually
even the bug itself hasn't been one; this off by one mistake was deliberatly
accepted in the - obviously wrong - assumption that nobody would ever try to
use the last byte of userspace. See also the Alpha variant of the code;
looks like they suffer from the same problem.
My solution will be to truncate userspace by by at least 4kb. I've choosen
to even truncate it by 32kb; this will also make the layout of the address
space for 32-bit processes on 64-bit kernels and 32-bit kernel identical
again.
Ralf
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-01-16 7:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3A5CAC53.60700@jungo.com>
[not found] ` <20010110122159.A24714@lineo.com>
2001-01-11 7:28 ` [BusyBox] 0.48 - Can't mount /proc Michael Shmulevich
2001-01-11 7:28 ` Michael Shmulevich
2001-01-11 11:48 ` Erik Andersen
2001-01-11 12:04 ` Florian Lohoff
2001-01-11 15:52 ` Quinn Jensen
2001-01-11 15:52 ` Quinn Jensen
2001-01-16 7:13 ` Ralf Baechle
2001-01-11 20:25 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.