Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5390516iog; Wed, 22 Jun 2022 19:11:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vJohQ0Bnv1aS2s/IFAvEeDsnSnaB4l+zy572++b/SBLaR41sK/pzeKhw9JESH0/pUofQeL X-Received: by 2002:a17:90b:1b4d:b0:1ec:c414:8539 with SMTP id nv13-20020a17090b1b4d00b001ecc4148539mr1443866pjb.204.1655950315380; Wed, 22 Jun 2022 19:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655950315; cv=none; d=google.com; s=arc-20160816; b=Cp6udJdVU9z1iJpwmsueRRy3OzL8XHPMCVhUeyMrgKWi9tfPX9AoHXGa74/MqJ0+w7 koxiw4/aN9xesUmeCp5kbvYwUhBqQX5ab+LuH3/9x5Lf0eILPv/4EHPjrHTzunBXyNCu uE22F87CgqjJJ8wXE2m3Eu/+RJ5eV/HxyScoSERVsSM2oL0UrSyNwnIShvi6pMugJx8N qs54sTczqULfKaLnoUTWiaHwLKYkRJ9hFOR6Xfhr9ZEyOstLbqrOdEe7vze/3cHaVcfK BFqI5BzDej8s6zGDn7VngvfiC1p5juwDTbm6F8ZL/E2jGoWL3bI4V6Hh1FJOnWXpwEG4 4MmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=OuRerDfWC5LPrDr7z5NyHBeKLSNLSDRr5twLKZDbWHs=; b=A2p3xTeJnjxuUBRSUjXES4DhmZKb2ofVuPRVZ78CZ8H0BnXnQ3NA65xWwxAh6KcEkj qlsrRr7thy9YKmpP1l0HMdFlz+pCz/dpuV7b708W6HOpXEpSynxxB+W5ZsnmsKUjisGg LKqlh5f2N8LYL8N95JlT0IYUeonmoleUv0tJO2X5IlBv8q804BxSocnUklsFEo/uDVNI FzjEozaKfTk++kgnGA0cmJT5VDx8w7KAvo9uctEzF/mACm+5pq6HKZHmgutUpc1MtDQ+ KS89BrCXXvfm1A9VuMd9XROLkAUYOTHUxn/IvQz2ARzZE8K9GYFgXHCKIEyhpjNJOmVs EiFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a170902f61100b0015bd2c5232esi24473000plg.568.2022.06.22.19.11.42; Wed, 22 Jun 2022 19:11:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378010AbiFWBxN (ORCPT + 99 others); Wed, 22 Jun 2022 21:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358274AbiFWBwH (ORCPT ); Wed, 22 Jun 2022 21:52:07 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD59843AE7; Wed, 22 Jun 2022 18:51:50 -0700 (PDT) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4LT38j0MrRz1KC2v; Thu, 23 Jun 2022 09:49:41 +0800 (CST) Received: from dggpemm500013.china.huawei.com (7.185.36.172) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 23 Jun 2022 09:51:48 +0800 Received: from ubuntu1804.huawei.com (10.67.175.36) by dggpemm500013.china.huawei.com (7.185.36.172) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 23 Jun 2022 09:51:48 +0800 From: Chen Zhongjin To: , , , , , CC: , , , , , , , , , , , , , , Subject: [PATCH v6 15/33] arm64: bug: Add reachable annotation to warning macros Date: Thu, 23 Jun 2022 09:48:59 +0800 Message-ID: <20220623014917.199563-16-chenzhongjin@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220623014917.199563-1-chenzhongjin@huawei.com> References: <20220623014917.199563-1-chenzhongjin@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.175.36] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500013.china.huawei.com (7.185.36.172) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org WARN* and BUG* both use brk #0x800 opcodes and the distinction is provided by the contents of the bug table. This table is not accessible to objtool, so add an annotation to WARN* macros to let objtool know that brk handler will return an resume the execution of the instructions following the WARN's brk. Signed-off-by: Julien Thierry Signed-off-by: Chen Zhongjin --- arch/arm64/include/asm/bug.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/bug.h b/arch/arm64/include/asm/bug.h index 28be048db3f6..9917429971d4 100644 --- a/arch/arm64/include/asm/bug.h +++ b/arch/arm64/include/asm/bug.h @@ -19,7 +19,11 @@ unreachable(); \ } while (0) -#define __WARN_FLAGS(flags) __BUG_FLAGS(BUGFLAG_WARNING|(flags)) +#define __WARN_FLAGS(flags) \ +do { \ + __BUG_FLAGS(BUGFLAG_WARNING|(flags)); \ + annotate_reachable(); \ +} while (0) #define HAVE_ARCH_BUG -- 2.17.1