lkml.org 
[lkml]   [2022]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 01/16] powerpc: Replace unreachable() with it's builtin variant in WARN_ON()
From
Hi Christophe,

On 26/08/22 15:48, Christophe Leroy wrote:
>
> Le 08/08/2022 à 13:48, Sathvika Vasireddy a écrit :
>> objtool is throwing *unannotated intra-function call*
>> warnings with a few instructions that are marked
>> unreachable. Replace unreachable() with __builtin_unreachable()
>> to fix these warnings, as the codegen remains same
>> with unreachable() and __builtin_unreachable().
>>
>> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
>> ---
>> arch/powerpc/include/asm/bug.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h
>> index 61a4736355c2..074be1a78c56 100644
>> --- a/arch/powerpc/include/asm/bug.h
>> +++ b/arch/powerpc/include/asm/bug.h
>> @@ -99,7 +99,7 @@
>> __label__ __label_warn_on; \
>> \
>> WARN_ENTRY("twi 31, 0, 0", BUGFLAG_WARNING | (flags), __label_warn_on); \
>> - unreachable(); \
>> + __builtin_unreachable(); \
> Should you add barrier_before_unreachable() before
> __builtin_unreachable() to avoid stack bombs ?
>
> See commit 173a3efd3edb ("bug.h: work around GCC PR82365 in BUG()")

Yes, adding barrier_before_unreachable() before __builtin_unreachable()

works around the build issues reported at
https://lkml.org/lkml/2022/8/25/418.

I'll post a v2 with this change.

Thanks for the suggestion!

- Sathvika

\
 
 \ /
  Last update: 2022-08-29 07:48    [W:0.147 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site