Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp232511rdb; Sat, 30 Sep 2023 02:14:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4C9UOHb1OQ4dkPFLwXgyU/m5tEkWfpAYeo+ku6hc6Kve4XmwPaAVSnqyZHVDHcEoaq53M X-Received: by 2002:a17:902:f806:b0:1c7:443d:7419 with SMTP id ix6-20020a170902f80600b001c7443d7419mr4245462plb.29.1696065294463; Sat, 30 Sep 2023 02:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696065294; cv=none; d=google.com; s=arc-20160816; b=lLPLqGLjV+oNYwFLtE7HbrfZICkeBHYzsi77VMbs1onBY0HA69Z83ZdfMEkQd4bEAA +hrI9xpVBdztT2h5GT19jU/j6SlnPp8sSahg1fl1u1shAzyeYjVDN4am2tQAM6t4UobQ uZRRHGohxIs0dQnqF8kXmUJckGRGlxFxkJsDHoRftujH1gK+ai3IYu3/wv4wtvxNtUi5 u5uHA76rT93bnI1VVTlzHfXMU2GxmcjcSqduRazecxp7d0CewtAFz1WKvCe2bGf9Jptu hiGnhGeXWrKv6+CK2eOa17flrDkyYDrychrmb0pAQtI+csD90adQsuL2osQ/tOwwNQ6y UnxA== 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 :dkim-signature; bh=JliKXXvKNJl2xWNDXNGMW/zsOW3dCYV6v6Q0Ce1MZSU=; fh=Ee5qIAGWDIR5voTwCg1bOFFetx24dLoGFwQ3KtEQtAs=; b=x59D1iwBGxndpsbfR30p8f2bfZx9HjRaloFvC5YHeARwRs4+diH1Vt0jeRgnkFZ3KY FbYR5ljhbaUKA30DgBYVVuerULIzesHW7Bhg3XZcvaFstq/v5ZpU+nMBICYhV5hNfMJo /+0FWxvtvHc/BZVO/XBjOwVZNBX0LVc1e23fUq38TxCpkAxjfpu9nkAwRk5EJrsoi8bz nJxZcNQNTNYoaYBZzEQ5UrYMyBTV6UzuP+8wxR+WP/biFN9Q3Gr/eIfNrcjVfkm1FsaW MyztXWiopFI01KVtDwpAMnM/sJ/dzPbxp481SJ4JnxcwBtN4pXk4qpiEtqpKRl0wtpuo zucA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rm9SNykJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id h7-20020a170902680700b001b9ed021929si8222640plk.225.2023.09.30.02.14.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 02:14:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Rm9SNykJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 569468320DFC; Sat, 30 Sep 2023 02:14:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233945AbjI3JOr (ORCPT + 99 others); Sat, 30 Sep 2023 05:14:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229588AbjI3JOp (ORCPT ); Sat, 30 Sep 2023 05:14:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEE33BF for ; Sat, 30 Sep 2023 02:14:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D3BDC433C7; Sat, 30 Sep 2023 09:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696065282; bh=IDH9i4ossG8fiz9uTqL/nI6nmle6vBA4f7lhXd87Uxw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Rm9SNykJQwdTVW6S+Rf801ssab1h5iVg8gzKgmoRtFEW4Gs155ybnm+rBuwmhe/wo ItrleESvVOeL0vTQJuHBxCkj8xmEBUEOEZ0vkQ2MOmwnNrOpXHIXAni0aewiGrx6OZ xqz/ajf48Q8tqaV6nFOwuUovw9OxlzKfu3rhwjT0vI1sR3aUmvKBmC3Fa233NAFHi5 p0epjZiJZ+tvH+uo3MTRZVjE9gbw5Rn+Cmu8I94npTDDhnx+OV8yiZg90Nt2a/iDHc 5JgNvnNXsyV9LE1MDj3pA/VQcAbLuJhxdr047t8cmFyKwNaQ/IYSKQ0kH7ecurl1lW Io1hmHa9fALOg== Date: Sat, 30 Sep 2023 18:14:35 +0900 From: Masami Hiramatsu (Google) To: Alexei Starovoitov Cc: Steven Rostedt , Florent Revest , 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: Re: [PATCH v5 00/12] tracing: fprobe: rethook: Use ftrace_regs instead of pt_regs Message-Id: <20230930181435.6663ef5a6ad718548a1e414a@kernel.org> In-Reply-To: References: <169556254640.146934.5654329452696494756.stgit@devnote2> <20230929102115.09c015b9af03e188f1fbb25c@kernel.org> X-Mailer: Sylpheed 3.7.0 (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.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 30 Sep 2023 02:14:53 -0700 (PDT) On Fri, 29 Sep 2023 17:12:07 -0700 Alexei Starovoitov wrote: > On Thu, Sep 28, 2023 at 6:21 PM Masami Hiramatsu wrote: > > > > > > Thus, what I need is to make fprobe to use function-graph tracer's shadow > > stack and trampoline instead of rethook. This may need to generalize its > > interface so that we can share it between fprobe and function-graph tracer, > > but we don't need to involve rethook and kretprobes anymore. > > ... > > > And need to add patches > > > > - Introduce a generized function exit hook interface for ftrace. > > - Replace rethook in fprobe with the function exit hook interface. > > you mean that rethook will be removed after that? No, it is too late. rethook is deeply integrated with kretprobe. So when we remove the kretprobe, rethook will be removed too. (fprobe and kretprobe provides similar functionality, so we can move to fprobe) Even though, objpool(*) itself might be kept for some other use cases. As far as I can see, ftrace_ret_stack can not provide a context local storage between entry -> exit callbacks. (so this feature must be dropped from fprobe) (*) https://lore.kernel.org/all/20230905015255.81545-1-wuqiang.matt@bytedance.com/ Thank you, -- Masami Hiramatsu (Google)