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

From: Paolo Abeni
Date: Tue May 30 2023 - 06:30:40 EST

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 think we can drop this patch.