Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7866050rwb; Wed, 23 Nov 2022 11:51:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf5pdQ4HLyBjc90gMjvKIyzByL4kn10+FhDM/vpDi26mLi7Iz9F1o6fsSN/ROeGaEhJylpt4 X-Received: by 2002:a17:90b:2544:b0:20a:f341:4ed9 with SMTP id nw4-20020a17090b254400b0020af3414ed9mr37516985pjb.11.1669233074187; Wed, 23 Nov 2022 11:51:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669233074; cv=none; d=google.com; s=arc-20160816; b=NMioAiGr1uNBJVTMJJAKgl/kW0dlCXwazkikcr5th/xjcWHe11PVgxe+kiO0W1Ewv6 rK2/907d6uMHR4KO9YTGJclGaCPxVQGrdpPReHCSkQM2PzR7ykKUeoNpKZtQKtKxqPWO dLSA53bhmjJ0W/i7RYUahigqSKIW3n+GCzGFiT68//uvOgrECIaK+OtL04yXxT04VBV3 Ry12dWWRDFK2whEVqzQHTt/A1Su8QnmIWI0PV5SYDQnvO6gIgCKjM1TA2Z3rdW8aZ9JP ROOD/EeJ9+qljmqg7iHq/GxPTvsl50M52B0y/twAhR35kmg3tVRuuhDzx1tQf15AQT/c CUng== 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=t6DBkAIMLcBYW3wougTiAy8hSpQd5wnTmVaRRCAuQrQ=; b=ZoMlVVXPc3N8COa0MtkDYvWiejDsSHopSpkJKcp4HrjAn28M/IPp8woPRzke30pqfI qOT0uVrwmmrkrqZ9+tQoOq86mNVUAEZKriD8iq+M6Ko2+GFuNdxhAO9cpkryUTUfM9IA XJrXcP4KTDgn/eBrPgsE+FuEoWQUN0MZEeHYq6Sg27zUlbaYryh4fQu8KTLvChJEgaoH ne6F5iPW3PpZn33JxhtXztzVVUDgI5haWwifMWLWgLO9DEG/IquglqqgT/QIapJYRQB1 oN5H3QD0XuHkq8cExSXYjV0MQzxnbblBVkeAT9HsD7rvDN7u6RbP84HbRccqblorQSXS Y8+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aXnqfmRm; 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 h6-20020a636c06000000b00476fddeafe1si16072784pgc.394.2022.11.23.11.50.56; Wed, 23 Nov 2022 11:51:14 -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=aXnqfmRm; 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 S239276AbiKWSTt (ORCPT + 88 others); Wed, 23 Nov 2022 13:19:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238816AbiKWSTq (ORCPT ); Wed, 23 Nov 2022 13:19:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB3C310FA for ; Wed, 23 Nov 2022 10:19:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id 96D59B82215 for ; Wed, 23 Nov 2022 18:19:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3436CC433D6; Wed, 23 Nov 2022 18:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669227583; bh=HfKCxUf/kEaMg1EqZNQeaiJch/1K7iIS4r+c9bp1iXQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aXnqfmRmmoF2y8Y1euD9uZ4PKDjWXASOgjU+dk3A/cuMWxMZ13O9gqwOS1nHGz9Ft SEgs2U7Gqgl03gHDZCje0dcXSSYjvn8rtDY/28mbUuth/2QzpOfbwnkY+swPBmF0tM Asi4/8pl/WmN9zQGpjeRLRJ/Hv09x7/Nrlg+W4REyiOXBug0OfaePFJJb/uS5f4107 C4uZB3oOW+VT2hFcAJG+E1byGg9KCm8lvOnBWLrCm55xClT7xRKmBSHWBvbAZh1f7J XQ50nDMhYUPZ9YcbmKCzhItf77Bt5OoYLCnnkgTeTJlSRU1enURNik03xJ1rerX2oo 6PxVzrZIn3WVg== Date: Wed, 23 Nov 2022 10:19:41 -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: <20221123181941.fh4hrr3pazelwtxc@treble> References: <20221121040736.GA3738360@paulmck-ThinkPad-P17-Gen-1> <20221121145215.GF4001@paulmck-ThinkPad-P17-Gen-1> <20221122051605.4hcbslwxez2trdvt@treble> <20221123002258.GR4001@paulmck-ThinkPad-P17-Gen-1> <20221123014812.7gptbvvndzemt5nc@treble> <20221123174951.GZ4001@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221123174951.GZ4001@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 Wed, Nov 23, 2022 at 09:49:51AM -0800, Paul E. McKenney wrote: > > > > Perhaps the best way would be to stick a REACHABLE annotation in > > > > arch_cpu_idle_dead() or something? > > > > > > When I apply this on -next, I still get the objtool complaint. > > > Is there something else I should also be doing? > > > > Silly GCC is folding the inline asm. This works (but still doesn't seem > > like the right approach): > > > > diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c > > index 26e8f57c75ad..128e7d78fedf 100644 > > --- a/arch/x86/kernel/process.c > > +++ b/arch/x86/kernel/process.c > > @@ -702,7 +702,7 @@ static void (*x86_idle)(void); > > #ifndef CONFIG_SMP > > static inline void play_dead(void) > > { > > - BUG(); > > + _BUG_FLAGS(ASM_UD2, 0, ASM_REACHABLE); > > } > > #endif > > I tried this, and still get: > > vmlinux.o: warning: objtool: do_idle+0x156: unreachable instruction > > Maybe my gcc is haunted? Weird, it worked for me. I have gcc version 12.2.1 20220819 (Red Hat 12.2.1-2) (GCC) and I can't really fathom why that wouldn't work. Maybe it's a different issue? The "unreachable instruction" warning is limited to one, so when a first warning gets fixed, a second warning might suddenly become visible. Can you attach arch/x86/kernel/process.o? -- Josh