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