Re: [PATCH] net: skbuff: fix missing a __noreturn annotation warning

From: Miaohe Lin
Date: Fri Jun 02 2023 - 23:09:38 EST


On 2023/5/30 18:28, Paolo Abeni wrote:
> On Fri, 2023-05-26 at 21:00 -0700, Kuniyuki Iwashima wrote:
>> From: Miaohe Lin <linmiaohe@xxxxxxxxxx>
>> Date: Sat, 27 May 2023 19:04:09 +0800
>>> Add __noreturn annotation to fix the warning:
>>> net/core/skbuff.o: warning: objtool: skb_push+0x3c: skb_panic() is missing a __noreturn annotation
>>> net/core/skbuff.o: warning: objtool: skb_put+0x4e: skb_panic() is missing a __noreturn annotation
>>
>> What arch are you using ?
>>
>> IIUC, BUG() should have an annotation for objtool, for
>> example, __builtin_unreachable() for x86.
>>
>> Maybe the arch is missing such an annotation ?
>>
>> Also I'm curious why objtool complains about only skb_push(),
>> there should be more non-inline functions that has BUG().
>
> AFAICS, the BUG() macro implementation should already carry the
> __noreturn annotation, via panic() or other arch-specific way.
>
> This looks like the old toolchain not being able to
> successfully/correctly propagate the annotation???

I tend to agree with you. Will drop it. Thanks for your comment.

>
> I think we can drop this patch.
>
> Cheers,
>
> Paolo
>
> .
>