Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2206313rwb; Fri, 5 Aug 2022 15:43:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR7NG4L6qU30tAYdeNM0GzQf6CkDQvzTdAn63aMuRRGQHUJG3lj3+rPDlwCSHC9p2FfL3hXm X-Received: by 2002:a05:6402:26c2:b0:43d:d885:451a with SMTP id x2-20020a05640226c200b0043dd885451amr8402576edd.287.1659739420907; Fri, 05 Aug 2022 15:43:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659739420; cv=none; d=google.com; s=arc-20160816; b=wSCufNJxMYYic0ltTUYDYi0az+igDuf1BN1W5pjEtafiQc7p0X2MoZ/+zmbL5rpWYD 1b7JbVG1XDReGB1l2uFGgnXyx02uo4AnTAQmuRBfe3kb1FBPUQloSBGOFURqJ4WAcsys kANkUQJ1rcI7uXt49eYuw/vbASSsb1UFJr50oAd904t3u1J6+HIXnZK9V1evnLZv66M+ hbz4YhR+33iw40bxtJD+TN26RWaCLG2PbUQ9zg+s4qbGdZPy292sLhiQtAhVzz3h6TYH oK1LAqE2yc96/euyAfQu0UGvHszcCXcbzVXjgSy3oH0IOoUZPCqmtvzJEQkBSIQgUjvT ChPg== 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=QqsnOBWxrJhGoQZvFmcra+w3PB/mcGgcj1xuyZ4jgHo=; b=jI+Fy2SADVRLZuz83HgRF4Pl1/kO9qskWoxQHwfumHX8ftsGuXbfwTKJ2Othlj9HCa /fi9WeuRSf8ox+UEn/dlmaNRJmb1adN4GlcgmtNeHkkMtJLQ9uBlbPHrSZ5v9P86tlo+ fW3yluxK6es8yk5tzGu+BvsmKpQQrr3nu/4CQxv/pMI6/fwKccVMXXZRacupyp100ykU 9ZbcgE5Y7VhUWfLs7eiBe0p2aZKV53DIsS61owIrMT68Gn5Y7L4e417DTDEfaiOMYkk0 1zI6Ov34aIhT2RvpFEGM4n7Gal+1CkkgVJ1eBkHBN1ro5EflA7kc5AZ2DFc255zqUJ5F lZ5w== 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 dr7-20020a170907720700b007305b582b36si4893215ejc.469.2022.08.05.15.43.13; Fri, 05 Aug 2022 15:43:40 -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 S241017AbiHEWZ7 (ORCPT + 99 others); Fri, 5 Aug 2022 18:25:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237744AbiHEWZ5 (ORCPT ); Fri, 5 Aug 2022 18:25:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2FBC1705E for ; Fri, 5 Aug 2022 15:25:55 -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 5F05260DDE for ; Fri, 5 Aug 2022 22:25:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC4F9C433D6; Fri, 5 Aug 2022 22:25:53 +0000 (UTC) Date: Fri, 5 Aug 2022 18:25:52 -0400 From: Steven Rostedt To: Ivan Babrou Cc: Daniel Dao , kernel-team , Ingo Molnar , linux-kernel , Masami Hiramatsu Subject: Re: 5.15 ftrace bug when enabling function_graph Message-ID: <20220805182552.742c4162@gandalf.local.home> In-Reply-To: References: <20220223115457.7bb575c1@gandalf.local.home> <20220805145333.1360dbbb@gandalf.local.home> 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 Fri, 5 Aug 2022 13:14:47 -0700 Ivan Babrou wrote: > On Fri, Aug 5, 2022 at 11:53 AM Steven Rostedt wrote: > > > > On Fri, 5 Aug 2022 11:37:56 -0700 > > Ivan Babrou wrote: > > > > > root@foo:~# echo 'bpf_dispatcher_*_func' > > > > /sys/kernel/tracing/set_ftrace_notrace > > > > > > root@foo:~# trace-cmd record -p function_graph -l handle_mm_fault -P 3367417 > > > plugin 'function_graph' > > > Hit Ctrl^C to stop recording > > > > > > > [1459709.204253] ------------[ ftrace bug ]------------ > > > [1459709.204257] ftrace failed to modify > > > [1459709.204262] [] bpf_dispatcher_xdp_func+0x0/0x10 > > > [1459709.204275] actual: ffffffe9:ffffff9b:76:ffffffb0:14 > > > [1459709.204302] Setting ftrace call site to call ftrace function > > > [1459709.204305] ftrace record flags: 10000001 > > > [1459709.204309] (1) > > > expected tramp: ffffffffabc4bcb0 > > > [1459709.204325] ------------[ cut here ]------------ > > > > Did you reboot since the error happened? Because the command you showed > > should not have touched bpf_dispatcher_xdp_func. > > I did reboot, but I can reproduce if you have things for me to try. Let's see if this works manually. Reboot again. Make sure the above "ftrace bug" is not there. If not already mounted, as root: # mount -t tracefs tracefs /sys/krenel/tracing # cd /sys/kernel/tracing # cat enabled_functions Let me know what is there. # echo handle_mm_fault > set_ftrace_filter # cat set_ftrace_filter to make sure that handle_mm_fault is listed. # echo function_graph > current_tracer If it fails again, let me know. It should not, but if it does, it needs to be investigated. Oh, and what exactly is this kernel version. The backtrace you posted shows: 5.15.19-cloudflare-2022.2.1 If you can not reproduce this on a vanilla 5.15.19 kernel, then it may be a bad backport of some patch. -- Steve