Re: Patch for the "ug" bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/07/2012 12:41 PM, Jean-Yves Avenard wrote:
> Hello
> 
> This is my first post here, so hopefully I'm doing it the right way.
> 
> I recently an Asus RT-N66U router, powered by a Broadcom BCM5300. MIPS
> based obviously.
> 
> I am an infrequent committer of the Tomato firmware team.
> One issue was reported that caused quite surprising problems. We call
> it the "ug" bug.
> 
> In a shell:
> cd /tmp
> echo "#!/bin/sh" >bug
> echo 'echo -n $1.' >>bug
> chmod +x bug
> for i in 0 1 2 3 4 5 6 7 8 9; do bug $i; done
> 
> would result in random data being output.
> Typically it would look something like:
> ug.1.ug.3.ug.5.ug.ug.ug.ug.root@RT-N66U:/tmp#
> 
> This issue affects a few other firmware (ddwrt) in particular. This
> doesn't affect Asus stock firmware
> 
> After a short investigation, I ruled out that the problem was either
> in uclibc or busybox and is something related to an issue in the
> kernel
> 
> Looking at the kernel shipped with the Asus, they have made some
> modifications in how pages are initialised...
> 
> The following patch, is a port of the required changes that fix the
> memory corruption exposed by the "ug" bug...
> 
> Let me know if you would like this patch to be submitted differently.
> Not knowing the submit policy, I put it inline, but due to the
> presence of tabs (ugh!) it may not come out properly.
> 
> The patch is for the linux that ships with Tomato obviously, but
> checking the linux git repository, it will apply with minor mod. Let
> me know if you want me to do those mods for you..
> 
> Best regards
> Jean-Yves Avenard

Hi,

this is a little late but I haven't seen this earlier. I just tried your
script and had no problems on my Asus RT-N66U running OpenWrt with
kernel 3.10.24. This problem was either cause by some other non upstream
Broadcom modification or was already fixed in mainline kernel.


root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# echo "#!/bin/sh" >bug
root@OpenWrt:/tmp# echo 'echo -n $1.' >>bug
root@OpenWrt:/tmp# cat bug
#!/bin/sh
echo -n $1.
root@OpenWrt:/tmp# chmod +x bug
root@OpenWrt:/tmp# for i in 0 1 2 3 4 5 6 7 8 9; do ./bug $i; done
0.1.2.3.4.5.6.7.8.9.root@OpenWrt:/tmp#
root@OpenWrt:/tmp#

Hauke


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux