Re: [PATCH 2/2] jump label: disable due to compiler bug

From: Jason Baron
Date: Thu Oct 28 2010 - 16:12:16 EST


On Thu, Oct 28, 2010 at 11:55:32AM -0700, David Daney wrote:
> On 10/28/2010 07:17 AM, Jason Baron wrote:
>> On Wed, Oct 27, 2010 at 03:21:55PM -0700, H. Peter Anvin wrote:
>>> Could you detail the bug, please? static_cpu_has() also uses asm goto.
>>>
>>
>> It seems that gcc can leave the stack in an inconsistent state.
>>
>> I only saw this in the 'jmp' enabled case, I'm not sure if it can occur in the
>> straight-line code path as well.
>>
>
> Jason,
>
> Were you going to file a GCC bug on this issue? Someone should.
>

I will file one. I did inform Richard Henderson about the bug, and he
has already developed a fix. I'm not sure yet, when the fix will be
included in gcc.

Also, Richard said that -maccumulate-outgoing-args flag avoids this bug.
That flag is already always set for x86_64 (see arch/x86/Makefile), but not
for x86. This is also consistent with our testing. We have not seen the
crash on x86_64, only x86.

Thus, I'm going to propose a patch, which makes jump label conditional
on x86_64 for now (adding -maccumulate-outgoing-args to x86 increases
the text size, so I'm not proposing adding the flag there).

I'm not sure whether other architectures are exposed to this bug or not.
I'm trying to find out.

thanks,

-Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/