From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9542C7EE2A for ; Sat, 3 Jun 2023 03:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236697AbjFCDJe (ORCPT ); Fri, 2 Jun 2023 23:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231849AbjFCDJ3 (ORCPT ); Fri, 2 Jun 2023 23:09:29 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CDD3BD; Fri, 2 Jun 2023 20:09:28 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QY4bB1QYrzTl19; Sat, 3 Jun 2023 11:09:10 +0800 (CST) Received: from [10.174.151.185] (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 3 Jun 2023 11:09:24 +0800 Subject: Re: [PATCH] net: skbuff: fix missing a __noreturn annotation warning To: Paolo Abeni , Kuniyuki Iwashima CC: , , , , References: <20230527110409.497408-1-linmiaohe@huawei.com> <20230527040038.6783-1-kuniyu@amazon.com> <0ab4f3ea2bd97c7067ed332c0128829f4a7ea596.camel@redhat.com> From: Miaohe Lin Message-ID: <89ec1a82-7f1d-21f9-4ece-e321b261e9a5@huawei.com> Date: Sat, 3 Jun 2023 11:09:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <0ab4f3ea2bd97c7067ed332c0128829f4a7ea596.camel@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/5/30 18:28, Paolo Abeni wrote: > On Fri, 2023-05-26 at 21:00 -0700, Kuniyuki Iwashima wrote: >> From: Miaohe Lin >> 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 > > . >