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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF230ECAAD2 for ; Mon, 29 Aug 2022 05:48:08 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MGKGt5bH2z3bk9 for ; Mon, 29 Aug 2022 15:48:06 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=g+9gXMC/; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=sv@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=g+9gXMC/; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4MGKG22Xg1z2xGf for ; Mon, 29 Aug 2022 15:47:21 +1000 (AEST) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27T3nkUC019437; Mon, 29 Aug 2022 05:46:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=HnBwohWacgYEuPKS+IFdY3Wh7/m18PjVGtUqNP2tyuo=; b=g+9gXMC/IGmVeQ9uq2llE0Pj3UzOmtHZUTTqs7cCNFxwgODSuzj9O4mrWZXUivZUkLxm ZeZiiNn9L1MPMpkccpjMRdTRpUfqdKBblg9xVJao+c/g59JL5mLTUc+h6ZBApc3r9kLt 9cXyoXq7Le0vR0d2eyZNI16UoFQvWWeNHUy9GK9SoljMTL0pQMVzyf6SAPDsh35QEfyR jC9c2c4K8UNaqOBkmNycs+9kx1QB4RmB+bhmDfqFbpXC2qQlONXylVRAIWrJk/SJOIdh KN3zntzb9pMjYqLmg/A+w6kujk+MRqm41clGFuElxPsJpeFUf68ox9SerGrVBMCdzIoe 7g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j8nw0t658-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:54 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27T5d0tD033093; Mon, 29 Aug 2022 05:46:54 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j8nw0t64e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:53 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27T5ZYm5026918; Mon, 29 Aug 2022 05:46:51 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3j7aw91uue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:51 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27T5kmhG36307308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Aug 2022 05:46:48 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D46C54C044; Mon, 29 Aug 2022 05:46:48 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0BCAB4C040; Mon, 29 Aug 2022 05:46:44 +0000 (GMT) Received: from [9.43.67.34] (unknown [9.43.67.34]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 29 Aug 2022 05:46:43 +0000 (GMT) Message-ID: <8c185fe0-cc43-1cd9-ea1d-0e0f34ad1828@linux.vnet.ibm.com> Date: Mon, 29 Aug 2022 11:16:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 01/16] powerpc: Replace unreachable() with it's builtin variant in WARN_ON() Content-Language: en-US To: Christophe Leroy , Sathvika Vasireddy , "linuxppc-dev@lists.ozlabs.org" References: <20220808114908.240813-1-sv@linux.ibm.com> <20220808114908.240813-2-sv@linux.ibm.com> <43a23349-3356-3347-f395-ba31db8c6978@csgroup.eu> From: Sathvika Vasireddy In-Reply-To: <43a23349-3356-3347-f395-ba31db8c6978@csgroup.eu> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Oi5FODQRRJuBCQ0cChU3-zr7qxLHKnvx X-Proofpoint-GUID: vwuxdR0fMFD4vVq1ltBJW9O5nqe8AWly Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-29_02,2022-08-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 impostorscore=0 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208290026 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , "aik@ozlabs.ru" , "mingo@redhat.com" , "npiggin@gmail.com" , "jpoimboe@redhat.com" , "naveen.n.rao@linux.vnet.ibm.com" , "mbenes@suse.cz" , "chenzhongjin@huawei.com" , "linux-arm-kernel@lists.infradead.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 >> --- >> 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DEBE8ECAAD2 for ; Mon, 29 Aug 2022 05:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:From:References:Cc:To: Subject:Date:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A68i9EK4IeLbgHYGdQy9C9e3MwBQpYA+jy/d1JhiIPs=; b=Hpq2AwlO6+QHzGm0sd7XEQgB0Y e6esFISYKQrJikvxc3MDO1Qd5KA5vvhswBEnzCdyxQVBm0s4fNgm3lM/RuL+h8ZcF/nNKUZmSy/Vg SmnKrWxVoQ76MYbV8w6t20Wi/zOXMMrGzOpHNOFhsa2bGyOojKDPCj/gWcLdv+cTs8pfPUpzocIRb fbNmDJ8UA1eEy/GxvWkZ09cMTL35mJayReDNd39CYeZIZ+1peW7qp+3QlC8Uqc2wL6HaFFHIYQlAS B9BJIuLBs0WsRDY+A7sNLgwxthLwVLvaKc0WsEkfsUPCN5D4hlV26wZkhXBgqum6nzAvsFcvCswHG y0j5YyZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSXcF-004zbR-SW; Mon, 29 Aug 2022 05:47:20 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSXcA-004zXT-Qe; Mon, 29 Aug 2022 05:47:17 +0000 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27T3nkUC019437; Mon, 29 Aug 2022 05:46:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=HnBwohWacgYEuPKS+IFdY3Wh7/m18PjVGtUqNP2tyuo=; b=g+9gXMC/IGmVeQ9uq2llE0Pj3UzOmtHZUTTqs7cCNFxwgODSuzj9O4mrWZXUivZUkLxm ZeZiiNn9L1MPMpkccpjMRdTRpUfqdKBblg9xVJao+c/g59JL5mLTUc+h6ZBApc3r9kLt 9cXyoXq7Le0vR0d2eyZNI16UoFQvWWeNHUy9GK9SoljMTL0pQMVzyf6SAPDsh35QEfyR jC9c2c4K8UNaqOBkmNycs+9kx1QB4RmB+bhmDfqFbpXC2qQlONXylVRAIWrJk/SJOIdh KN3zntzb9pMjYqLmg/A+w6kujk+MRqm41clGFuElxPsJpeFUf68ox9SerGrVBMCdzIoe 7g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j8nw0t658-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:54 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27T5d0tD033093; Mon, 29 Aug 2022 05:46:54 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j8nw0t64e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:53 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27T5ZYm5026918; Mon, 29 Aug 2022 05:46:51 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3j7aw91uue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:51 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27T5kmhG36307308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Aug 2022 05:46:48 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D46C54C044; Mon, 29 Aug 2022 05:46:48 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0BCAB4C040; Mon, 29 Aug 2022 05:46:44 +0000 (GMT) Received: from [9.43.67.34] (unknown [9.43.67.34]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 29 Aug 2022 05:46:43 +0000 (GMT) Message-ID: <8c185fe0-cc43-1cd9-ea1d-0e0f34ad1828@linux.vnet.ibm.com> Date: Mon, 29 Aug 2022 11:16:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 01/16] powerpc: Replace unreachable() with it's builtin variant in WARN_ON() Content-Language: en-US To: Christophe Leroy , Sathvika Vasireddy , "linuxppc-dev@lists.ozlabs.org" Cc: "jpoimboe@redhat.com" , "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , "aik@ozlabs.ru" , "mpe@ellerman.id.au" , "mingo@redhat.com" , "rostedt@goodmis.org" , "mbenes@suse.cz" , "npiggin@gmail.com" , "chenzhongjin@huawei.com" , "linux-arm-kernel@lists.infradead.org" , "naveen.n.rao@linux.vnet.ibm.com" References: <20220808114908.240813-1-sv@linux.ibm.com> <20220808114908.240813-2-sv@linux.ibm.com> <43a23349-3356-3347-f395-ba31db8c6978@csgroup.eu> From: Sathvika Vasireddy In-Reply-To: <43a23349-3356-3347-f395-ba31db8c6978@csgroup.eu> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Oi5FODQRRJuBCQ0cChU3-zr7qxLHKnvx X-Proofpoint-GUID: vwuxdR0fMFD4vVq1ltBJW9O5nqe8AWly X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-29_02,2022-08-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 impostorscore=0 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208290026 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220828_224715_234673_2685D3FE X-CRM114-Status: GOOD ( 17.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org SGkgQ2hyaXN0b3BoZSwKCk9uIDI2LzA4LzIyIDE1OjQ4LCBDaHJpc3RvcGhlIExlcm95IHdyb3Rl Ogo+Cj4gTGUgMDgvMDgvMjAyMiDDoCAxMzo0OCwgU2F0aHZpa2EgVmFzaXJlZGR5IGEgw6ljcml0 wqA6Cj4+IG9ianRvb2wgaXMgdGhyb3dpbmcgKnVuYW5ub3RhdGVkIGludHJhLWZ1bmN0aW9uIGNh bGwqCj4+IHdhcm5pbmdzIHdpdGggYSBmZXcgaW5zdHJ1Y3Rpb25zIHRoYXQgYXJlIG1hcmtlZAo+ PiB1bnJlYWNoYWJsZS4gUmVwbGFjZSB1bnJlYWNoYWJsZSgpIHdpdGggX19idWlsdGluX3VucmVh Y2hhYmxlKCkKPj4gdG8gZml4IHRoZXNlIHdhcm5pbmdzLCBhcyB0aGUgY29kZWdlbiByZW1haW5z IHNhbWUKPj4gd2l0aCB1bnJlYWNoYWJsZSgpIGFuZCBfX2J1aWx0aW5fdW5yZWFjaGFibGUoKS4K Pj4KPj4gU2lnbmVkLW9mZi1ieTogU2F0aHZpa2EgVmFzaXJlZGR5IDxzdkBsaW51eC5pYm0uY29t Pgo+PiAtLS0KPj4gICAgYXJjaC9wb3dlcnBjL2luY2x1ZGUvYXNtL2J1Zy5oIHwgMiArLQo+PiAg ICAxIGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKyksIDEgZGVsZXRpb24oLSkKPj4KPj4gZGlm ZiAtLWdpdCBhL2FyY2gvcG93ZXJwYy9pbmNsdWRlL2FzbS9idWcuaCBiL2FyY2gvcG93ZXJwYy9p bmNsdWRlL2FzbS9idWcuaAo+PiBpbmRleCA2MWE0NzM2MzU1YzIuLjA3NGJlMWE3OGM1NiAxMDA2 NDQKPj4gLS0tIGEvYXJjaC9wb3dlcnBjL2luY2x1ZGUvYXNtL2J1Zy5oCj4+ICsrKyBiL2FyY2gv cG93ZXJwYy9pbmNsdWRlL2FzbS9idWcuaAo+PiBAQCAtOTksNyArOTksNyBAQAo+PiAgICAJX19s YWJlbF9fIF9fbGFiZWxfd2Fybl9vbjsJCQkJXAo+PiAgICAJCQkJCQkJCVwKPj4gICAgCVdBUk5f RU5UUlkoInR3aSAzMSwgMCwgMCIsIEJVR0ZMQUdfV0FSTklORyB8IChmbGFncyksIF9fbGFiZWxf d2Fybl9vbik7IFwKPj4gLQl1bnJlYWNoYWJsZSgpOwkJCQkJCVwKPj4gKwlfX2J1aWx0aW5fdW5y ZWFjaGFibGUoKTsJCQkJXAo+IFNob3VsZCB5b3UgYWRkIGJhcnJpZXJfYmVmb3JlX3VucmVhY2hh YmxlKCkgYmVmb3JlCj4gX19idWlsdGluX3VucmVhY2hhYmxlKCkgdG8gYXZvaWQgc3RhY2sgYm9t YnMgPwo+Cj4gU2VlIGNvbW1pdCAxNzNhM2VmZDNlZGIgKCJidWcuaDogd29yayBhcm91bmQgR0ND IFBSODIzNjUgaW4gQlVHKCkiKQoKWWVzLCBhZGRpbmcgYmFycmllcl9iZWZvcmVfdW5yZWFjaGFi bGUoKSBiZWZvcmUgX19idWlsdGluX3VucmVhY2hhYmxlKCkKCndvcmtzIGFyb3VuZCB0aGUgYnVp bGQgaXNzdWVzIHJlcG9ydGVkIGF0IApodHRwczovL2xrbWwub3JnL2xrbWwvMjAyMi84LzI1LzQx OC4KCkknbGwgcG9zdCBhIHYyIHdpdGggdGhpcyBjaGFuZ2UuCgpUaGFua3MgZm9yIHRoZSBzdWdn ZXN0aW9uIQoKLSBTYXRodmlrYQoKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fCmxpbnV4LWFybS1rZXJuZWwgbWFpbGluZyBsaXN0CmxpbnV4LWFybS1rZXJu ZWxAbGlzdHMuaW5mcmFkZWFkLm9yZwpodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFu L2xpc3RpbmZvL2xpbnV4LWFybS1rZXJuZWwK 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 00B11ECAAD2 for ; Mon, 29 Aug 2022 05:47:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229599AbiH2Frb (ORCPT ); Mon, 29 Aug 2022 01:47:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiH2Fr2 (ORCPT ); Mon, 29 Aug 2022 01:47:28 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 821FD45F79 for ; Sun, 28 Aug 2022 22:47:27 -0700 (PDT) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27T3nkUC019437; Mon, 29 Aug 2022 05:46:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=HnBwohWacgYEuPKS+IFdY3Wh7/m18PjVGtUqNP2tyuo=; b=g+9gXMC/IGmVeQ9uq2llE0Pj3UzOmtHZUTTqs7cCNFxwgODSuzj9O4mrWZXUivZUkLxm ZeZiiNn9L1MPMpkccpjMRdTRpUfqdKBblg9xVJao+c/g59JL5mLTUc+h6ZBApc3r9kLt 9cXyoXq7Le0vR0d2eyZNI16UoFQvWWeNHUy9GK9SoljMTL0pQMVzyf6SAPDsh35QEfyR jC9c2c4K8UNaqOBkmNycs+9kx1QB4RmB+bhmDfqFbpXC2qQlONXylVRAIWrJk/SJOIdh KN3zntzb9pMjYqLmg/A+w6kujk+MRqm41clGFuElxPsJpeFUf68ox9SerGrVBMCdzIoe 7g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j8nw0t658-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:54 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27T5d0tD033093; Mon, 29 Aug 2022 05:46:54 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j8nw0t64e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:53 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27T5ZYm5026918; Mon, 29 Aug 2022 05:46:51 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3j7aw91uue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 05:46:51 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27T5kmhG36307308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 Aug 2022 05:46:48 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D46C54C044; Mon, 29 Aug 2022 05:46:48 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0BCAB4C040; Mon, 29 Aug 2022 05:46:44 +0000 (GMT) Received: from [9.43.67.34] (unknown [9.43.67.34]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 29 Aug 2022 05:46:43 +0000 (GMT) Message-ID: <8c185fe0-cc43-1cd9-ea1d-0e0f34ad1828@linux.vnet.ibm.com> Date: Mon, 29 Aug 2022 11:16:37 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 01/16] powerpc: Replace unreachable() with it's builtin variant in WARN_ON() Content-Language: en-US To: Christophe Leroy , Sathvika Vasireddy , "linuxppc-dev@lists.ozlabs.org" Cc: "jpoimboe@redhat.com" , "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , "aik@ozlabs.ru" , "mpe@ellerman.id.au" , "mingo@redhat.com" , "rostedt@goodmis.org" , "mbenes@suse.cz" , "npiggin@gmail.com" , "chenzhongjin@huawei.com" , "linux-arm-kernel@lists.infradead.org" , "naveen.n.rao@linux.vnet.ibm.com" References: <20220808114908.240813-1-sv@linux.ibm.com> <20220808114908.240813-2-sv@linux.ibm.com> <43a23349-3356-3347-f395-ba31db8c6978@csgroup.eu> From: Sathvika Vasireddy In-Reply-To: <43a23349-3356-3347-f395-ba31db8c6978@csgroup.eu> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Oi5FODQRRJuBCQ0cChU3-zr7qxLHKnvx X-Proofpoint-GUID: vwuxdR0fMFD4vVq1ltBJW9O5nqe8AWly Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-29_02,2022-08-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 impostorscore=0 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208290026 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> --- >> 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