The fix only affects one file, arch/arm/lib/memset.S, which hasn't changed for quite a while. The two relevant commits in the stable 3.9.x tree are:
From a branch on the linux-sunxi repository the fixes can be pulled in with the command
git cherry-pick 455bd4c430b0c0a361f38e8658a0d6cb469942b5 418df63adac56841ef6b0f1fcf435bc64d4ed177
This has been tested on the sunxi-3.4 branch compiled with the latest linaro gcc 4.8 toolset.
>
> I noticed in the commit messages that this is a problem since gcc-4.7.2, is that correct?
>
> (I'm asking since I'm currently using 4.7.2)
>
Not quite sure, the 4.7.3 version of linaro gcc that I was using previously seemed to work OK without any patches to the kernel. So I guess the problem only shows up for real with gcc 4.8. Of course, if the compiler optimizations that trigger the issue can also happen with gcc 4.7.2 or 4.7.3, that could result in potential problems rearing up unexpectedy.
In any case, the safer solution seems to be to apply the commits regardless whether gcc 4.8 or 4.7 is used to compile the kernel.
Hi,
On 06/27/2013 08:49 PM, Harm Hanemaaijer <fge...@yahoo.com> wrote:
> The current linux-sunxi kernels, like other ARM kernels, have issues when compiled with recent gcc versions >= 4.8. This is related to a bug in the ARM memset function in the kernel. However, this is already fixed upstream in the mainline kernel by two commits (one commit provided an initial fix, the other one fixed bugs in that one). However, the latest versions of the stable upstream 3.4.x tree do not contain the fix.
>
> The fix only affects one file, arch/arm/lib/memset.S, which hasn't changed for quite a while. The two relevant commits in the stable 3.9.x tree are:
>
Thanks for this! I've added these 2 patches to my personal wip tree for now:
github.com/jwrdegoede/linux-sunxi.git/sunxi-3.4-a20-wip
(I'm asking since I'm currently using 4.7.2)
Regards,
Hans