Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4630170rwb; Tue, 8 Aug 2023 11:11:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG43oQrs/KrM3bT/aCH1nW6+eVYzmHZlLpwM2t8rBdQ/Xb43tdxpJLH5vGt11Tn/K8OHGug X-Received: by 2002:aa7:de09:0:b0:50b:c630:a956 with SMTP id h9-20020aa7de09000000b0050bc630a956mr418258edv.17.1691518296945; Tue, 08 Aug 2023 11:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691518296; cv=none; d=google.com; s=arc-20160816; b=bXbwcjT8aKErwnufvv7ylAMkf+XkFVAH6arl62M1K2V2pSa+YysL/4ly012idiatzH 7o3DHw2RziaSmm2ayIhB6HpgG47mxOOBMI0aw2NHyj/HpdF2nN156aPSAXxeaSMeBVu6 Nw+vjSxScShBoyn82aRyAkFyFhe2bg8hAt/1Cq0SZb+eSS+0aHj96dHIYwr+7w6M5Jjx 7IaeV3zdMFbwcYsE9Cy9+N6WQDoW41oShkLV18xo5X+gHbU81ITHQ2dvPp06Svk8/70d pKcN0JGTrEHgb/L6NaOYfD1Reumm+nth7qHq/gu188mSiUFiTTz3CpEJVaVx/TrF4iqA HkIg== 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=xITyBuadELzkPU+CjpJQBVBo7xYiesK3ZST0a8P1AH8=; fh=g9Bw0epkbGk1DkAgG7vR8XN0xStfTcipNOxWcjLkU0g=; b=uJdReGJB8rdWGpIWSBl2J7Ybj6Y+e6P6d8sCgK5ANo+lLOZHiC8XWCzjYmBei/W+sT BPu4D7anSvngn1AjwNG7YFe0C4Isz3PeBqqwT6NGPN/NBz31PiPCNkIgwRlPGc9erU3Q ohvI2zGFeEdasGpegx8/cyBHUBubQDuq5zhy0GncmmrqeU/W9SFkoEN2iDglqxrxyhvD ozY+M6LeYtpPK6kZLA8MsVfulhABHHx4UBRvpFg5DLVwHoZp/WKIGattHlVHMCxtPiMd ncVq/VNmhzlRf6qyXfsnTFhxvGuuG4u3uRnlNr9ReJXAcBCVmNX/2BtdPDkTuLv0dAYm 7aew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kWWVkBum; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a056402150e00b005233625c229si3981917edw.118.2023.08.08.11.11.13; Tue, 08 Aug 2023 11:11:36 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kWWVkBum; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234737AbjHHRgA (ORCPT + 99 others); Tue, 8 Aug 2023 13:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234748AbjHHRfe (ORCPT ); Tue, 8 Aug 2023 13:35:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EE1097D5E; Tue, 8 Aug 2023 09:15:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6760F625A6; Tue, 8 Aug 2023 14:53:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26319C433CA; Tue, 8 Aug 2023 14:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691506432; bh=uwQnu9f4p3k5CfpSJXtgO6zZRF7NC7rvvkAoWiX73N0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kWWVkBumS+i71Op3410bY/vV7U4C2J0z4eah/iV9yVXuMEHBAInHVfSo4Vr8Nn/ho Ux2la/urUI7czt+QMS6s1RA5yhJPj7y0SZpiKrz1ARokPd2lWBarZnEnFD71VVQ83w 3jM0Ns1O5gvK/o5iGJKSf8W3tipPUS2Z3zzGfX78wzMqXx+iNmGCNpXGRE1yfT7zlj rgCrpabu2SiqpwN5eryt+ZL2AzRMU4o+rcCAt8jVFMbe8cqhvIH/tCW64EBDMl67O4 jzw74Yy57/LlxPOXFlUY7vCvPCt6B6mQiU/Z6g6xF6pZjhURJr+Z6ASCpAsb7ZIn3l t6SApgn6cNcWw== Date: Tue, 8 Aug 2023 23:53:46 +0900 From: Masami Hiramatsu (Google) To: Florent Revest Cc: Alexei Starovoitov , Steven Rostedt , 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 Subject: Re: [RFC PATCH v2 0/6] bpf: fprobe: rethook: Use ftrace_regs instead of pt_regs Message-Id: <20230808235346.fdd76875c71f0806773fad74@kernel.org> In-Reply-To: References: <169139090386.324433.6412259486776991296.stgit@devnote2> 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=-3.9 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 On Tue, 8 Aug 2023 16:29:27 +0200 Florent Revest wrote: > On Mon, Aug 7, 2023 at 8:48 AM Masami Hiramatsu (Google) > wrote: > > > > Florent, feel free to add your rethook for arm64, but please do not remove > > kretprobe trampoline yet. It is another discussion point. We may be possible > > to use ftrace_regs for kretprobe by ftrace_partial_regs() but kretprobe > > allows nest probe. (maybe we can skip that case?) > > Ack :) > > > arch/Kconfig | 1 + > > arch/arm64/include/asm/ftrace.h | 11 ++++++ > > arch/loongarch/Kconfig | 1 + > > arch/s390/Kconfig | 1 + > > arch/x86/Kconfig | 1 + > > arch/x86/kernel/rethook.c | 9 +++-- > > include/linux/fprobe.h | 4 +- > > include/linux/ftrace.h | 56 ++++++++++++++++++----------- > > include/linux/rethook.h | 11 +++--- > > kernel/kprobes.c | 9 ++++- > > kernel/trace/Kconfig | 9 ++++- > > kernel/trace/bpf_trace.c | 14 +++++-- > > kernel/trace/fprobe.c | 8 ++-- > > kernel/trace/rethook.c | 16 ++++---- > > kernel/trace/trace_fprobe.c | 76 ++++++++++++++++++++++++--------------- > > kernel/trace/trace_probe_tmpl.h | 2 + > > lib/test_fprobe.c | 10 +++-- > > samples/fprobe/fprobe_example.c | 4 +- > > I believe that Documentation/trace/fprobe.rst should also be modified > following the API change Indeed. Let me update it. Thanks! -- Masami Hiramatsu (Google)