linux-mips
[Top] [All Lists]

Re: Patch for the "ug" bug

To: Jean-Yves Avenard <jyavenard@gmail.com>, linux-mips@linux-mips.org
Subject: Re: Patch for the "ug" bug
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Tue, 07 Jan 2014 20:52:50 +0100
In-reply-to: <CANpj82+h1a0qBfaaYpqmuL69JpbB+T_z0pg0iL=5JPBvDE9A2w@mail.gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <CANpj82+h1a0qBfaaYpqmuL69JpbB+T_z0pg0iL=5JPBvDE9A2w@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
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

<Prev in Thread] Current Thread [Next in Thread>