Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1998247pxp; Mon, 7 Mar 2022 06:34:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6KcoqJ7S3uQJ66gkgkn6EhB7bFK1i2Ni2NSyTX+f0gIaFFn12fxGhj/45J8DthpeqimTI X-Received: by 2002:a17:906:eb51:b0:6db:a3d:3a0b with SMTP id mc17-20020a170906eb5100b006db0a3d3a0bmr7316851ejb.140.1646663682890; Mon, 07 Mar 2022 06:34:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646663682; cv=none; d=google.com; s=arc-20160816; b=bqLAywZA4bE50vyxRx0/wED+b9WxnA2JXU092OP+Atq+t+p8Rq79+c8Ysdimt4+ACW WcEC1hoNTGx8RLO9lwvDE3l+zkxNlb/Z2IC3WIZWOUg1MZDUn9+WTijA8xL6iXjNjNfN jsjRfAV3mK8XArJeFjVxJWnoPHeoNS+xR6n6VfyIfzJENiPgcXeJhyJGww/SKrNLyAC9 DYGTskV94zJL5hkVJYEeBKh6o9DFlZF7wbR8032Ti5UxSqBptnqOVDajFGmQb+Ggva2c F3kMdQrVgpzUDArIX7PKyquRqrnlNZWIPbtZy2YVEcKkYJ8OCj92BSRNYVjTBVI9rWfI UrOw== 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=6TZZ807yPASMw4ZjSAy9xhYEeFY+ClIefS8N42Fa5xw=; b=PTvfkhyXkU9UAdq5JoX+zc5QTNAeapVzDUlMZbf+XuYosRojw4zT4zgLo3OSUzYthg A4uYkG9r/MMbIl9T9ZfERDkPy630CXbgyP17FcrGx4CzYk/5XYwyfgmPcz5kjVL0Lixb zIOD4TW7fqKqMcA3V50qNnhO8Lde9GkFOJZmY618HKCIKNCSEHqzAhrDgx+ekSen9WQG LM7k2t+CyMdA6FGTm+AlW9pKGYpu762AJyCXIu3V6HVrdxVcadSMn++qmHLa3pD1NxWU YKgn7YHKi7I/FaJZsDVQirX+34GU31vs1FVQK/fa/EfbU+45YjwABEqvc/IxEamst+N6 bL/A== 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 k22-20020a1709062a5600b006cfd20e14dbsi8314531eje.674.2022.03.07.06.34.08; Mon, 07 Mar 2022 06:34:42 -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; 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 S236316AbiCGN3u (ORCPT + 99 others); Mon, 7 Mar 2022 08:29:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbiCGN3t (ORCPT ); Mon, 7 Mar 2022 08:29:49 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6515B36B69 for ; Mon, 7 Mar 2022 05:28:55 -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 1FDC0B81243 for ; Mon, 7 Mar 2022 13:28:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E997C340F3; Mon, 7 Mar 2022 13:28:52 +0000 (UTC) Date: Mon, 7 Mar 2022 08:28:50 -0500 From: Steven Rostedt To: Arend van Spriel Cc: Ingo Molnar , Linux Kernel Mailing List Subject: Re: ftrace bug Message-ID: <20220307082850.0278e961@gandalf.local.home> In-Reply-To: <8bf3ddb5-e9fc-dcc9-ad7d-1677334f6386@broadcom.com> References: <9a86b2c9-1009-1683-442e-61c5a7dc8cf3@broadcom.com> <8bf3ddb5-e9fc-dcc9-ad7d-1677334f6386@broadcom.com> 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=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 Mon, 7 Mar 2022 13:00:05 +0100 Arend van Spriel wrote: > On 3/7/2022 12:26 PM, Arend van Spriel wrote: > > Hi Steven, > > > > I wanted to use FTRACE on an ARM platform and I hit the following > > warning which results in ftrace bug. This happens upon loading a module. > > Looking up the warning I suspect the branch target is too far off. The > > module is quite large and therefor not loaded in the modules section. Is > > there a way to exclude a module. In ftrace_module_init I see a check for > > !mod->num_ftrace_callsites. Is there a way to avoid creating ftrace > > callsites in a module? > > Could it be accomplished by this? > > CFLAGS_REMOVE_lockdep.o = $(CC_FLAGS_FTRACE) > You mean with something other than "lockdep.o". You can do that to remove all ftrace callers from the .o file. You could add the problem functions with "notrace" (which you should be able to see what functions those were from the ftrace_bug output after the "cut here"). You could keep an entire directory from having ftrace to it with: ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE) in the make file for that directory, and it will remove it totally. But this should be considered a work around, by removing this, you lose all the functionality you get with ftrace (tracing, ebpf attachments, and live patching). -- Steve