Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3426390pxp; Tue, 8 Mar 2022 14:14:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyTbRGICO+TOyu6rNYbOiprCc8Kq50qXoUAjDBwNoGMxEdrQAL95gBAddJ5UDX+/E71RH7 X-Received: by 2002:a17:907:2d9f:b0:6da:74aa:c1a6 with SMTP id gt31-20020a1709072d9f00b006da74aac1a6mr15410205ejc.683.1646777677214; Tue, 08 Mar 2022 14:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646777677; cv=none; d=google.com; s=arc-20160816; b=BYSmeB4zASKVsIy5hnEyZbIJZ8CVdaJQCOqPUKHoCfbk3J1Pg28sGaGMvutnr0b2r6 C4mWJF7SqvRBXIpHbf7yW2LyvENHK+q4oLPV8ddhuNSsizf+K+bakkHK6cylGFFrwvuy ISRs2x1Ky8eZ5RYH8e19lya51Wbpf7SPmpbtbhVXYeyYjmS6YOp11VddNViGqpZFzP9B KVQREPqdgzMYihVbM+VkUnVsuSRRXhDq5p+rDsJFERBRIgYkn+asNFfTp/wt6n0fT118 MLo1zH0g84o9HNgQktUrHEH9xl1AZEmfZCZYyMNgwFsK2SpoDELsI0eGayHhSTrbFk79 uf2Q== 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=xybnxAsglkIrWyLjQQ1SHJqefJcipivy2XDA40k28HQ=; b=CzTDZOuFhwxDIhzryaft9Hx/hELqB+llYnmQYvsnUIyHvwJ0FTGPSOxLP0h/oaZliv frKRRQY7GoQoAigxiaVD1N4h8VNcWpLgNMLPyZUV6k8K+Rr3dEzrAzM1kXd2ww6qBEQy oSw/7xmY8mY8apiPTYyezRNFGWC7kgzSPfbXUdgq/MItWRaSpzgFTyMThVOFZc+O/2oI xf98gYKTILCeimPyEmE1Q45UPwg2KW8hDobbTMu+uNEFRLqB5O9kBfVNnqnG5ZZJQhWC V5L/OX6N9VdJTONq3E7f2MXTyK38/WcOhPjC8HevfO77/y4/IjLJYYyBpMrDlqpvLLA4 KzfA== 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 qf35-20020a1709077f2300b006da92828a05si72214ejc.29.2022.03.08.14.14.14; Tue, 08 Mar 2022 14:14:37 -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 S242165AbiCGNZz (ORCPT + 99 others); Mon, 7 Mar 2022 08:25:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234024AbiCGNZt (ORCPT ); Mon, 7 Mar 2022 08:25:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 550807EDB2 for ; Mon, 7 Mar 2022 05:24:53 -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 E3E8E611EF for ; Mon, 7 Mar 2022 13:24:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01CA0C340E9; Mon, 7 Mar 2022 13:24:51 +0000 (UTC) Date: Mon, 7 Mar 2022 08:24:50 -0500 From: Steven Rostedt To: Arend van Spriel Cc: Ingo Molnar , Linux Kernel Mailing List Subject: Re: ftrace bug Message-ID: <20220307082450.641ed866@gandalf.local.home> In-Reply-To: <9a86b2c9-1009-1683-442e-61c5a7dc8cf3@broadcom.com> References: <9a86b2c9-1009-1683-442e-61c5a7dc8cf3@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 12:26:45 +0100 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? Are you sure it's the size. Just want to make sure that's the reason before going with different solutions. > > Regards, > Arend > > ------------[ cut here ]------------ > > WARNING: CPU: 2 PID: 1525 at arch/arm/kernel/insn.c:47 > __arm_gen_branch+0x70/0x78 > > CPU: 2 PID: 1525 Comm: insmod Tainted: P 4.19.183 #2 > > Hardware name: Generic DT based system > > [] (unwind_backtrace) from [] (show_stack+0x20/0x24) > > [] (show_stack) from [] (dump_stack+0x98/0xac) > > [] (dump_stack) from [] (__warn.part.0+0xcc/0xe8) > > [] (__warn.part.0) from [] > (warn_slowpath_null+0x54/0x74) > [] (warn_slowpath_null) from [] > (__arm_gen_branch+0x70/0x78) > [] (__arm_gen_branch) from [] > (ftrace_make_nop+0x64/0xec) > [] (ftrace_make_nop) from [] > (ftrace_process_locs+0x370/0x4b4) > > [] (ftrace_process_locs) from [] > (ftrace_module_init+0x38/0x3c) > > [] (ftrace_module_init) from [] > (load_module+0x18d0/0x2570) > [] (load_module) from [] > (sys_finit_module+0xe0/0xf8) > [] (sys_finit_module) from [] > (ret_fast_syscall+0x0/0x58) > Exception stack(0xd9b1bfa8 to 0xd9b1bff0) > > bfa0: 01170228 00000000 00000003 01170228 00000000 > beb7ceb3 > bfc0: 01170228 00000000 beb7cdc4 0000017b 00127010 00000000 00000000 > 00000000 > bfe0: beb7cc38 beb7cc28 0001a0dc 00012890 > > ---[ end trace f48808a851a4544a ]--- > > ------------[ cut here ]------------ > > WARNING: CPU: 2 PID: 1525 at kernel/trace/ftrace.c:2034 > ftrace_bug+0xfc/0x394 Three should be more content after the "cut here" that is very relevant (I hate that cut here, because I constantly need to tell people to show me more :-p I need to add a "ftrace bug cut here" line.) Could you show me the output right after that. -- Steve