Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5348834rwb; Mon, 21 Nov 2022 21:29:29 -0800 (PST) X-Google-Smtp-Source: AA0mqf541VyBVB6ewf02QnerNSAeef+sQmPckYVYqD10kaJFhp83fQDLuxld082Je9SxwrxSubIH X-Received: by 2002:a17:907:2c49:b0:7ad:9891:8757 with SMTP id hf9-20020a1709072c4900b007ad98918757mr4843774ejc.335.1669094969470; Mon, 21 Nov 2022 21:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669094969; cv=none; d=google.com; s=arc-20160816; b=ci1Zk4hm0ACaioND/DY6O2Yvk4DY/rvfSoHBbjBiN5P64XL7Iv6SF3sWyZQNHSDHkp gQooyaBevy8UNh0gEFOTIh5ag4MpBrOJrIfJzO/ZafvEaiOU3/FD9zjoac5DLpJewMtn xrkCclQzoRidBvj6Ef7aFfVRHU779iiY63VtJcmLB16xatNsXSWWk+RVKfhf1NsfDPlA NnI6+gpN+yy0HaL803BwoQxHItQ2kKO78FSOBzxb25r3Fn8NvMwi2B5raNHIIgv+eIqb ldDRJAZrvcrKUDqLXMM/s1S5D9LFmyI/UsmlhfXuhFAnPbmspM7CpJfpcxFD40KI1k8l 8gyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9YdXhfJO+WVyUzK/xRtvxXJluHJbiXYUeyOWWqaP2fU=; b=0dbt8s1KUV3ZNIEAQv5nqsvXrke0pkARyWV3OWWIvLDrkvWJWnIvSc9Qi7RI8Nozj+ oo5eoD62O72C0sXPrEz+PXvrDiPwUcY3F3b4n7vTuf6Zh17lrmpnSK3Y9h4kENrCIAZa UM/jy7GGaybs/JagXZWh8EyQgBwg09Gvb2jQAmW0zAW3tsyL1SZX1EFog6SzfK+40ADd 0xsfOr8f9kL0DYKQZwYpq6B7o38UGlbhvpFDsJnqFAMJPDwWdnDW4lmHD+rfPs+D7Htt p3VWvY8/W1BvTgd3+mm0J0fcRis0T46qzOAbUe7/JBEvr4jCWsXQ8BC16QgVn3rxzfAh r7UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SB2wp065; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020aa7df0e000000b004692dc7d456si7564348edy.370.2022.11.21.21.29.02; Mon, 21 Nov 2022 21:29:29 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SB2wp065; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231132AbiKVFQL (ORCPT + 91 others); Tue, 22 Nov 2022 00:16:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiKVFQI (ORCPT ); Tue, 22 Nov 2022 00:16:08 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FB332D741 for ; Mon, 21 Nov 2022 21:16:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 910A861553 for ; Tue, 22 Nov 2022 05:16:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2CBDC433D6; Tue, 22 Nov 2022 05:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669094167; bh=oOjMbAIorQTr/Rs4n9T+lH2Eo+E+O5Q+WKpoUX0VaG4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SB2wp065pvRNR7c2axOoTaDgPANHVnQQ2gI/wDJGubFI93tGNLw8edsaV6baSAy4U XPtCBkrRwu9z+603ShJM/GC/+C96JDon/7PBupUVRou94vCyY93++cDyjBCBRe2hFj t7SUkQfz580MFRwl8qdVneVRFKhar7D/NCLwHhHNHdJa5Ax6YlFRuly4cVGhGBqI9v EjelYqBFo9yP2i0XtK036Cg2UVwh8+NleerDQMAbbvl6RvEUs4IbhyLVXBBApJ5Qs3 MYrfkLYdjvXVoB2/FD4OcU981xlJ3sKzcTksbk040TR9SI532eCmWoG9ZrZ/4piuWx gaO8wWgJaLlZA== Date: Mon, 21 Nov 2022 21:16:05 -0800 From: Josh Poimboeuf To: "Paul E. McKenney" Cc: Peter Zijlstra , sfr@canb.auug.org.au, linux-kernel@vger.kernel.org Subject: Re: objtool warning for next-20221118 Message-ID: <20221122051605.4hcbslwxez2trdvt@treble> References: <20221121040736.GA3738360@paulmck-ThinkPad-P17-Gen-1> <20221121145215.GF4001@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221121145215.GF4001@paulmck-ThinkPad-P17-Gen-1> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Mon, Nov 21, 2022 at 06:52:15AM -0800, Paul E. McKenney wrote: > On Mon, Nov 21, 2022 at 12:31:57PM +0100, Peter Zijlstra wrote: > > On Sun, Nov 20, 2022 at 08:07:36PM -0800, Paul E. McKenney wrote: > > > Hello! > > > > > > I have started getting this from rcutorture scenario TREE09: > > > > > > vmlinux.o: warning: objtool: do_idle+0x25f: unreachable instruction > > > > > > Should I be worried? > > > > Typically not a scary warning that. > > > > > If so, please let me know what additional information you need. > > > > .config and compiler version so that I might recreate and observe what > > it's complaining about would help :-) > > Fair enough! ;-) > > .config is attached, and the compiler versions are: > > gcc version 8.5.0 20210514 (Red Hat 8.5.0-15) (GCC) > gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) > > From an RCU perspective, the key points about TREE09's .config is > CONFIG_PREEMPTION=y and CONFIG_SMP=n, but running on a single-CPU qemu > instance. It's complaining about an unreachable instruction after a call to arch_cpu_idle_dead(). In this case objtool detects the fact arch_cpu_idle_dead() doesn't return due to its call to the non-CONFIG_SMP version of play_dead(). But GCC has no way of detecting that because the caller is in another translation unit. As far as I can tell, that function should never return. Though it seems to have some dubious semantics (see xen_pv_play_dead() for example, which *does* seem to return?). I'm thinking it would be an improvement to enforce that noreturn behavior across all arches and platforms, sprinkling __noreturn and BUG() on arch_cpu_idle_dead() and maybe some of it callees, where needed. Peter, what do you think? I could attempt a patch. -- Josh