[yocto] Fix for kernel 3.8/gcc-4.8 segfault on qemuarm
Khem Raj
raj.khem at gmail.com
Mon Jun 17 22:25:46 PDT 2013
On Jun 17, 2013, at 9:58 PM, Bruce Ashfield <bruce.ashfield at windriver.com> wrote:
> On 13-06-18 12:41 AM, Khem Raj wrote:
>>
>> On Jun 17, 2013, at 9:37 PM, Bruce Ashfield <bruce.ashfield at windriver.com> wrote:
>>
>>> On 13-06-17 11:30 PM, Khem Raj wrote:
>>>> Hi Bruce and All
>>>>
>>>> Finally after a long innings I have diagnosed the mystery behind the below segfault that we see on kernel 3.8 which compiled with gcc 4.8 but don't show when compiled with gcc 4.7
>>>>
>>>>
>>>
>>> There also seems to be a follow up patch:
>>>
>>> commit 418df63adac56841ef6b0f1fcf435bc64d4ed177
>>> Author: Nicolas Pitre <nicolas.pitre at linaro.org>
>>> Date: Tue Mar 12 13:00:42 2013 +0100
>>>
>>> ARM: 7670/1: fix the memset fix
>>>
>>> Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by
>>> recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
>>> with the memset return value. However the memset itself became broken
>>> by that patch for misaligned pointers.
>>>
>>> This fixes the above by branching over the entry code from the
>>> misaligned fixup code to avoid reloading the original pointer.
>>>
>>> Also, because the function entry alignment is wrong in the Thumb mode
>>> compilation, that fixup code is moved to the end.
>>>
>>> While at it, the entry instructions are slightly reworked to help dual
>>> issue pipelines.
>>>
>>> Signed-off-by: Nicolas Pitre <nico at linaro.org>
>>> Tested-by: Alexander Holler <holler at ahsoftware.de>
>>> Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
>>>
>>> :100644 100644 d912e73... 94b0650... M arch/arm/lib/memset.S
>>>
>>> --------
>>>
>>> I've staged it as well, and will do a boot test in the morning once
>>> my build has completed. Time to call it a night here.
>>
>> I did not need anything other than the first patch to get over the segfault. but yes it completes the fix
>> so having both is better
>
> So very strange. I got one segfault, and then this:
>
> Linux version 3.8.13-yocto-standard (bruce at yow-bashfiel-d2) (gcc version 4.8.1 (GCC) ) #2 PREEMPT Tue Jun 18 00:36:55 EDT 2013
>
> <snip>
>
> qemuarm login: root
> root at qemuarm:~# uname -a
> Linux qemuarm 3.8.13-yocto-standard #2 PREEMPT Tue Jun 18 00:36:55 EDT 2013 armv5tejl GNU/Linux
>
> ----------------
>
> Which means I may have just been unlucky on my testing with 3.10, or something
> else is going on.
Well I have been booting latest linus's (3.10-rc6) master compiled with gcc 4.8 just one patch from linux-yocto see below
http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.8/commit/?h=standard/arm-versatile-926ejs&id=351d133943b50a9dfeee07661d44254722a19f04
I wonder why this patch hasn't made upstream yet.
More information about the yocto
mailing list