Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2626524rwd; Wed, 17 May 2023 12:09:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50Le/jOGlnxIi8eQDvJiyGj73sX7Jh2qjittXvk9v8ACCvaSLR7fFPVVqv7uGRpLBeL7XB X-Received: by 2002:a05:6a20:12c5:b0:105:4184:17d4 with SMTP id v5-20020a056a2012c500b00105418417d4mr21219562pzg.19.1684350543530; Wed, 17 May 2023 12:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684350543; cv=none; d=google.com; s=arc-20160816; b=xtcRkVPDXPtKnDJx4MQbN2Jj5Vt3uWNu1MH7H1C4iIz4dLvzOlibbx+l2LBFwlK9WV /gIQxf/RmJYLlO5BPpk/S2V2xr8C0I6NLm93P7cgN80YBtuBdjBrinJ5Ee1pqLdDgyp1 eFQ0HltXNPoCx62BsKwyPj7GTehb0mEKKWDZ65YV/sci6upLw5fFuWnCtpd87n4siv0o 6OiKiNVPg8QUogCzi3tvy00yEdJ3iApvUYGszbq8NuES9oRqSWwhkkPGikXLxmxT6pny PHPRruiRdYH/lhcquL8edHwc5rlt/TaGejcsw2UP2saGujKH2aWlrRUqJxzb/XqMOUtp rzyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=/sEjYtT6r7gssom5rAUzrFR0o3hg9jTHg9CqBJEqGUQ=; b=cFDlQK5PNfey4CxJH23iWorqPDfvYAbubA3yVpsCeQ6ddcU/42q2YxLQz/go8OdZy3 uGVs3P753Rub467HFJbjS6W22vA3uBsndYQRTDrXrchq9Ml9zXBQ5oGWjZ172NDsVJUT Qw5eo6KvQne8xcxzhAVPtz0pLKBNAdOczfoGrZq5Euep/LTRae0WqCjZUQSlKXcRmOZm mABpTH9VxP9Zm0Eg/fkV0lnjm3vJYjffGEvR4x5vUstF3ilzep2bVgKeUBEE/2a5fWKY OR8a1FeFDy1RPmhuUGTX77fzmU4288aZjfB2yj1YB/KoQgfqNVLOa+PsF5798KEq/T1D I44Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a63aa05000000b00528595a1390si21655574pgf.588.2023.05.17.12.08.47; Wed, 17 May 2023 12:09:03 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229767AbjEQSoR convert rfc822-to-8bit (ORCPT + 99 others); Wed, 17 May 2023 14:44:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjEQSoP (ORCPT ); Wed, 17 May 2023 14:44:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6D741BC; Wed, 17 May 2023 11:44:13 -0700 (PDT) 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 5121263E63; Wed, 17 May 2023 18:44:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F848C433D2; Wed, 17 May 2023 18:44:11 +0000 (UTC) Date: Wed, 17 May 2023 14:44:09 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Arnd Bergmann , Masami Hiramatsu , linux-trace-kernel@vger.kernel.org, Arnd Bergmann , Luc Van Oostenryck , Kees Cook , Bart Van Assche , Sami Tolvanen , "Peter Zijlstra (Intel)" , linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tracing: make ftrace_likely_update() declaration visible Message-ID: <20230517144409.3f790524@gandalf.local.home> In-Reply-To: References: <20230517124721.929540-1-arnd@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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, 17 May 2023 09:39:41 -0700 Linus Torvalds wrote: > On Wed, May 17, 2023 at 5:47 AM Arnd Bergmann wrote: > > > > From: Arnd Bergmann > > > > This function is only used when CONFIG_TRACE_BRANCH_PROFILING is > > set, and the declaration is hidden behind this Kconfig symbol, > > which causes a warning if disabled: > > That explanation is not very clear. > > The problem is that the tracing code itself is built with > DISABLE_BRANCH_PROFILING, in order to not recurse. And that hides the > declaration when the definition is compiled, leading to the problem. > > CONFIG_TRACE_BRANCH_PROFILING isn't the problem in itself - *that* > part of the test is consistent (not used, not declared, and not > compiled if it is off). > > The problem is that DISABLE_BRANCH_PROFILING case, where it is used > elsewhere, but not declared when it is itself compiled. > > I applied the patch, but I tried to reword the explanation to be more > clear. I may have failed. > That's pretty much it. The DISABLE_BRANCH_PROFILING is to disable it in various places where it will crash if used (vdso is one of them). It is also used to prevent the code that declares it from recursing on itself (as you stated). Thus, the issue is simply that the declaration is hidden by the recursion protection where the function is actually defined. Reviewed-by: Steven Rostedt (Google) -- Steve