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 D73FEC433EF for ; Tue, 5 Jul 2022 15:52:56 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LcnJ705xhz3c7H for ; Wed, 6 Jul 2022 01:52:55 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=segher@kernel.crashing.org; receiver=) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lists.ozlabs.org (Postfix) with ESMTP id 4LcnHg5301z3000 for ; Wed, 6 Jul 2022 01:52:31 +1000 (AEST) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 265Fmsn6029167; Tue, 5 Jul 2022 10:48:55 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 265FmqXx029161; Tue, 5 Jul 2022 10:48:52 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 5 Jul 2022 10:48:52 -0500 From: Segher Boessenkool To: Christophe Leroy Subject: Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON() Message-ID: <20220705154852.GR25951@gate.crashing.org> References: <20220624183238.388144-1-sv@linux.ibm.com> <20220624183238.388144-12-sv@linux.ibm.com> <70b6d08d-aced-7f4e-b958-a3c7ae1a9319@csgroup.eu> <92eae2ef-f9b6-019a-5a8e-728cdd9bbbc0@linux.vnet.ibm.com> <6ab46ef2-6bbd-e758-a7ff-5f62fdf1ca96@csgroup.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6ab46ef2-6bbd-e758-a7ff-5f62fdf1ca96@csgroup.eu> User-Agent: Mutt/1.4.2.3i 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: Peter Zijlstra , Marc Zyngier , Sathvika Vasireddy , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , "aik@ozlabs.ru" , "mingo@redhat.com" , Sathvika Vasireddy , "jpoimboe@redhat.com" , "paulus@samba.org" , "naveen.n.rao@linux.vnet.ibm.com" , "mbenes@suse.cz" , Chen Zhongjin , Linux ARM Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Jul 04, 2022 at 12:34:08PM +0000, Christophe Leroy wrote: > Le 04/07/2022 à 13:45, Peter Zijlstra a écrit : > > I'm somewhat confused; how is an empty STT_FUNC a valid construct on > > Power? > > So am I. It is likely not a valid construct, but that's what GCC seems > to generate when you call annotate_unreachable(). It is a valid construct on (almost) all targets. If the user chooses to have executable code terminate in limbo, that is what the compiler will do (and this can result in a code symbol with size 0). Compare this to data symbols with no size, the situation is quite similar. Segher 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 1C19DC433EF for ; Tue, 5 Jul 2022 15:52: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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Mime-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ISNPo6JDblHgdULNsV7FFZOil6DmEQ71MGfyZ3PX6CE=; b=vVtGF2LLzhEY8g eD5ZoVM8JqXAeh7C6DS4myWcFmeG3FUg755qwvcyVdPGHJqhQhzbxLDXDF4sSGuZN5YGbuEb4Rk1m U4BN+urgCr6afTtS9DzJO/0UYQ8EJ9/2K/J7y2XKAOufzPDUJX5vT292BJyBV7FwlBgvXpx254w0k LlzW+YJQUBbJRvqSa7S03/ZpskkHjMBXLvWdOWqJ5drC1KXX3q0jrGyMaTx5qGfS/eiDphuPhTprZ 4AF9eth0qvpo51hV69+tWVcGL8fCFR+IU5fV/9KVESni/SzLljxldpb284H+xYE5TGRWiOkNUoklD S7FAC3mhciYIHgZUM0VA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8kpo-001HxR-Fc; Tue, 05 Jul 2022 15:51:32 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8kpj-001Huv-V3 for linux-arm-kernel@lists.infradead.org; Tue, 05 Jul 2022 15:51:29 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 265Fmsn6029167; Tue, 5 Jul 2022 10:48:55 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 265FmqXx029161; Tue, 5 Jul 2022 10:48:52 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 5 Jul 2022 10:48:52 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Peter Zijlstra , Marc Zyngier , "aik@ozlabs.ru" , Sathvika Vasireddy , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , Chen Zhongjin , "mingo@redhat.com" , Sathvika Vasireddy , "jpoimboe@redhat.com" , "paulus@samba.org" , "naveen.n.rao@linux.vnet.ibm.com" , "mbenes@suse.cz" , "linuxppc-dev@lists.ozlabs.org" , Linux ARM Subject: Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON() Message-ID: <20220705154852.GR25951@gate.crashing.org> References: <20220624183238.388144-1-sv@linux.ibm.com> <20220624183238.388144-12-sv@linux.ibm.com> <70b6d08d-aced-7f4e-b958-a3c7ae1a9319@csgroup.eu> <92eae2ef-f9b6-019a-5a8e-728cdd9bbbc0@linux.vnet.ibm.com> <6ab46ef2-6bbd-e758-a7ff-5f62fdf1ca96@csgroup.eu> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <6ab46ef2-6bbd-e758-a7ff-5f62fdf1ca96@csgroup.eu> User-Agent: Mutt/1.4.2.3i X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_085128_303801_C71BC29F X-CRM114-Status: UNSURE ( 8.84 ) X-CRM114-Notice: Please train this message. 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-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 04, 2022 at 12:34:08PM +0000, Christophe Leroy wrote: > Le 04/07/2022 =E0 13:45, Peter Zijlstra a =E9crit=A0: > > I'm somewhat confused; how is an empty STT_FUNC a valid construct on > > Power? > = > So am I. It is likely not a valid construct, but that's what GCC seems = > to generate when you call annotate_unreachable(). It is a valid construct on (almost) all targets. If the user chooses to have executable code terminate in limbo, that is what the compiler will do (and this can result in a code symbol with size 0). Compare this to data symbols with no size, the situation is quite similar. Segher _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 B10E7C43334 for ; Tue, 5 Jul 2022 15:57:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232605AbiGEP5s (ORCPT ); Tue, 5 Jul 2022 11:57:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232288AbiGEP5p (ORCPT ); Tue, 5 Jul 2022 11:57:45 -0400 Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0872E1164 for ; Tue, 5 Jul 2022 08:57:44 -0700 (PDT) Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 265Fmsn6029167; Tue, 5 Jul 2022 10:48:55 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 265FmqXx029161; Tue, 5 Jul 2022 10:48:52 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 5 Jul 2022 10:48:52 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Peter Zijlstra , Marc Zyngier , "aik@ozlabs.ru" , Sathvika Vasireddy , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , Chen Zhongjin , "mingo@redhat.com" , Sathvika Vasireddy , "jpoimboe@redhat.com" , "paulus@samba.org" , "naveen.n.rao@linux.vnet.ibm.com" , "mbenes@suse.cz" , "linuxppc-dev@lists.ozlabs.org" , Linux ARM Subject: Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON() Message-ID: <20220705154852.GR25951@gate.crashing.org> References: <20220624183238.388144-1-sv@linux.ibm.com> <20220624183238.388144-12-sv@linux.ibm.com> <70b6d08d-aced-7f4e-b958-a3c7ae1a9319@csgroup.eu> <92eae2ef-f9b6-019a-5a8e-728cdd9bbbc0@linux.vnet.ibm.com> <6ab46ef2-6bbd-e758-a7ff-5f62fdf1ca96@csgroup.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6ab46ef2-6bbd-e758-a7ff-5f62fdf1ca96@csgroup.eu> User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 04, 2022 at 12:34:08PM +0000, Christophe Leroy wrote: > Le 04/07/2022 à 13:45, Peter Zijlstra a écrit : > > I'm somewhat confused; how is an empty STT_FUNC a valid construct on > > Power? > > So am I. It is likely not a valid construct, but that's what GCC seems > to generate when you call annotate_unreachable(). It is a valid construct on (almost) all targets. If the user chooses to have executable code terminate in limbo, that is what the compiler will do (and this can result in a code symbol with size 0). Compare this to data symbols with no size, the situation is quite similar. Segher