From patchwork Sun Nov 5 16:10:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 161676 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2197851vqu; Sun, 5 Nov 2023 08:11:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdeHr9CrMRq46V26Cv8JLAcujeaRZ831+2P9VMn5OTaZ+u0rKFSyeBqgT5kQHTnX/SvlfM X-Received: by 2002:a05:6a21:7888:b0:181:a3ae:115b with SMTP id bf8-20020a056a21788800b00181a3ae115bmr8578884pzc.61.1699200671100; Sun, 05 Nov 2023 08:11:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699200671; cv=none; d=google.com; s=arc-20160816; b=VZ0NAG7OcpK/PKbLRWA2FiRQHuUkL3KJa+pXvChtt5d5qaJnKGFIvhDYy9fXJEHyYf XReRvxN54Yk6x6Yn97+xFi0vUJNyu+jShiQuTeFmTyxobHjW02BkvGuLjsNemTIprqPn flCaNtJ5xKE5uaoDeKXF6mTXwdpSAzbgxJ0G2aHEi1Tbb0H7Vg5j1Ze8jeAk3qoihzEz wtyCp7KxWXeMc0lWrrUXqNLnhuw/4eJQdYViZAk1OcLqP79DWKaceKsZKtnCbkracmtg vP+W06A8KnWH3W8KQguFdHL12pnrBHZ7oaBA0kBitRkkls68F53jnZ8/nuUkU+QrM9Sp c/Kg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y/k6B6oRDzgUirIm69QYAP2gIpyR3uWTbuQWNfQzotM=; fh=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=jm60nnEI0v8ISfSsD9/GXD/QQxtvsC0hnoyUH0Y6OYjTbML9Qkme5CaeydaS4zen57 78Z1Ut3ztx5S09wEygsbJeII/sbX9b5npP77j5c5LY0QiWpN76/ouNjMw3HPv8f8cdwF XqJMhmr/v4YsUnKGV7ZHZV7XlKYAka+RilBoOLU8hIUTpFxrnI8OvQ6TVRzgPsKSjBvC igHVN9/XBKgwYcpJIyS819OXFz/Nnsf9GY5lNkzmY58M8Wk50T627xEpc9TC8sskCQ6c lc1vy9VSJw7kGIwBLpLOhRNyVX2jI/7nSgnAsuEivs/lIVJwh8cOoApQd61B05DkzqLq N3sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ijq8qE6a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c130-20020a633588000000b005b9b68add85si6058335pga.254.2023.11.05.08.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 08:11:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ijq8qE6a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 51F258085986; Sun, 5 Nov 2023 08:10:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229599AbjKEQKZ (ORCPT + 34 others); Sun, 5 Nov 2023 11:10:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbjKEQKT (ORCPT ); Sun, 5 Nov 2023 11:10:19 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 118BD13E for ; Sun, 5 Nov 2023 08:10:17 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C31C1C433C7; Sun, 5 Nov 2023 16:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699200616; bh=/gBbJf7g1QrUiEN7ZPrz7W4ai3w02Yrm1jHvyS8561U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ijq8qE6apP/3tEMc7xQNaT1ZgohMP5WaYkHJZJLjvfucgOnkq8r8tZKlMpnIaRzoG iAgl0QVwW8FRbNaoPA/aBIVbNAp1IW7ANhQrFRRo6ITaqIvkVGnn7cnFDbwRuAtGX7 AGAMb81eNQdq7SI/g6khmRUvWkHaqrSTyUAkslVhM09Cqa/6UbPC35PM5SJQv8T0hm 2lD1u208cjdCKzkYrE75U/ZT1OpISl8GDOQuSp9HdwT171hfKZgk3GzG6+kDoNzaP6 b+v/jsTZnxYX4auQr1LcKkM0uowq0gHJyRNe/1l6yDnU1Ng7Z+kzrq1jNiLX6UcYx/ 0BVdFt5sbwbJw== From: "Masami Hiramatsu (Google)" To: Alexei Starovoitov , Steven Rostedt , Florent Revest Cc: linux-trace-kernel@vger.kernel.org, LKML , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Mark Rutland , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: [RFC PATCH 18/32] function_graph: Fix to initalize ftrace_ops for fgraph with ftrace_graph_func Date: Mon, 6 Nov 2023 01:10:10 +0900 Message-Id: <169920060974.482486.15664806338999944098.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <169920038849.482486.15796387219966662967.stgit@devnote2> References: <169920038849.482486.15796387219966662967.stgit@devnote2> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 05 Nov 2023 08:10:55 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781741042847867860 X-GMAIL-MSGID: 1781741042847867860 From: Masami Hiramatsu (Google) Fix to initialize the ftrace_ops of fgraph_ops with ftrace_graph_func instead of ftrace_stub. Signed-off-by: Masami Hiramatsu (Google) --- kernel/trace/fgraph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 597250bd30dc..858fb73440ec 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -872,7 +872,7 @@ unsigned long ftrace_graph_ret_addr(struct task_struct *task, int *idx, void fgraph_init_ops(struct ftrace_ops *dst_ops, struct ftrace_ops *src_ops) { - dst_ops->func = ftrace_stub; + dst_ops->func = ftrace_graph_func; dst_ops->flags = FTRACE_OPS_FL_PID | FTRACE_OPS_FL_STUB; #ifdef FTRACE_GRAPH_TRAMP_ADDR @@ -1120,7 +1120,7 @@ int register_ftrace_graph(struct fgraph_ops *gops) if (!gops->ops.func) { gops->ops.flags |= FTRACE_OPS_FL_STUB; - gops->ops.func = ftrace_stub; + gops->ops.func = ftrace_graph_func; #ifdef FTRACE_GRAPH_TRAMP_ADDR gops->ops.trampoline = FTRACE_GRAPH_TRAMP_ADDR; #endif