Warning!!
The problem is not in busybox but in the uClibc.
When you call the readdir routine the routine alloc a buffer up to the size of 
file system block (up 64kb for nfs mounted directory).
In the __getdents (int fd, char *buf, size_t nbytes) routine, a temporary 
buffer of that size is allocated on stack and get a stack overflow

-----Messaggio originale-----
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Greg Ungerer
Inviato: giovedì 26 giugno 2008 8.54
A: uClinux development list
Oggetto: Re: [uClinux-dev] Problems with 2GB FAT16 SD/CF cards - resolved

Hi Wolfgang,

Wolfgang Mües wrote:
> DSLINUX (www.dslinux.org) is using mostly SD cards for file system 
> storage. With the advent of 2 GByte SD cards with FAT16 and 32KByte 
> clustersize, many user have reported problems (data aborts while 
> traversing directories).
> 
> I have found that busybox needs more stack space to fix this problem.
> This was a hard-to-nail-down error, because with directory traversal 
> problems, network scripts fail, gdbserver fails, etc.

Any chance you can try the newest busybox version in the latest 
uClinux-dist-test-20080620?

According to the comments in its Makefile.flags:

# Busybox is a stack-fatty so make sure we increase default size # TODO: use 
"make stksizes" to find & fix big stack users # (we stole scripts/checkstack.pl 
from the kernel... thanks guys!) # Reduced from 20k to 16k in 1.9.0.
FLTFLAGS += -s 16000


So they have reduced its stack size even further. If this proves to be too 
small I'll increase before releasing...

Regards
Greg



> --- trunk/user/busybox/Rules.mak        2007-10-25 18:45:33 UTC (rev 
> 2027)
> +++ trunk/user/busybox/Rules.mak        2007-10-26 17:19:23 UTC (rev 
> 2028)
> @@ -47,7 +47,8 @@
>  # MAKEFILES      = $(TOPDIR).config
>  endif
>  
> -FLTFLAGS       += -s 20000
> +# Note that 20K stack space is too low if we use 2GB SD cards
> +FLTFLAGS       += -s 30000
>  
>  # What OS are you compiling busybox for?  This allows you to include  
> # OS specific things, syscall overrides, etc.
> 
> 
> 

--
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     [EMAIL PROTECTED]
Secure Computing Corporation                PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


This message (including any attachments) contains confidential
and/or proprietary information intended only for the addressee.
Any unauthorized disclosure, copying, distribution or reliance on
the contents of this information is strictly prohibited and may
constitute a violation of law.  If you are not the intended
recipient, please notify the sender immediately by responding to
this e-mail, and delete the message from your system.  If you
have any questions about this e-mail please notify the sender
immediately.
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to