Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1153874pxb; Sat, 15 Jan 2022 04:29:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcJlb05YpQE+Nut44vAQ+OLzLzio5LDy77+IQKSaL85cDQaGYrM10D++3QXMOoXb52Ri2/ X-Received: by 2002:a17:906:4f01:: with SMTP id t1mr2212196eju.423.1642249795255; Sat, 15 Jan 2022 04:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642249795; cv=none; d=google.com; s=arc-20160816; b=rwNzNxG5bkpCSEePxAvoOUkVhhQMsHYL4Ia9EPNladOuIBY8GIwP6MGkMrUAWNyfPW tXlsSgErrt/uWObBvboiPcx/sUSN4n0RwXdK5Nc480JDdfXj40LdX5hSZXg6vsxfkDel D4+tjmKHk4nAsIfNs9mGXuJeyFVkMWXos/32vSYM5JtUK1T5xJ7cTrBc1TrLEGsUfD4S w0mqWw8eR0meGkdZRtSVNmoCGeUXkKOu2sU80xEzVbn4iteVV35M1NLsuvFxqakrJr2o l0I2hNbRe4bKUfEMCLdWlGWP+l2IWDZasEZgtRvgfQ3RiCKSF3JfPMbn0HOiKcL2g5fh uKfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cV/KQAdoixRP2Jc7kX5ih1D3aR41cK+Dy/TFv78IhVY=; b=zEy4IFcJAotaOhh9rkBP2qFU8tk6on2y1oojyG+rugUNhVuY+45YJvRro1Hg4mY3tb NH8eI7fHE7tjFCDEX3kpfxwzbv1nOlCKvGfQWYN7RLJDKmDDVmlFfQozDF4IXKsZGrd4 3+hnyPsvtwJmEZTmxhytny/Sb5J2aURsiSB1sg9Fu73BxWqmPKkLMQ8QJtn2lKim20Xd mPEYiFHpMs+f4lqYpwfDU+Zp1NvXdjoSoiB47AvZnpNbw+bAbBSkSQtOQzXIyIS+GnML ak8vxraNqndk0OwQtroIDb111jAeRKvtgCgqYxvaHZoLMKSFRQOPSV94eVDRwwUOwGnI iSCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C9xJVmTc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd41si1586200ejc.492.2022.01.15.04.29.30; Sat, 15 Jan 2022 04:29:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=C9xJVmTc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231727AbiAOBCn (ORCPT + 99 others); Fri, 14 Jan 2022 20:02:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbiAOBCn (ORCPT ); Fri, 14 Jan 2022 20:02:43 -0500 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06B5DC061574; Fri, 14 Jan 2022 17:02:43 -0800 (PST) Received: by mail-io1-xd33.google.com with SMTP id p7so14478222iod.2; Fri, 14 Jan 2022 17:02:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cV/KQAdoixRP2Jc7kX5ih1D3aR41cK+Dy/TFv78IhVY=; b=C9xJVmTctCuMQKEqz+zvBi80svHjeyHO3AEwdTJnlo2VOzcWk6K+C7ldCp9MdKG/W3 0qf7XbyPheYQkoaqB+gW2MWvghElD4sNNg6c/PFptSBioKcBuimTseYrwXj5sqczvlfy EX6V1eIjGYpxRDu7iZkn3NulGT19/d+ZEoXtuRkiZ3mpZjdHCJy8fRgPmJoDopuIprS4 7mwdCDDWf/ID/o01w/c2/2YNe0N8/SG/FxOLOXnSrigkvPlSE2hs7fvbQuBfuh2iXcuz d9GYg7KLbPgb9AoD6iANKWGZMnUHu54onqQvWTcp6mWueDAWvwHhQGtd/gCni3V+Rni5 vOeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cV/KQAdoixRP2Jc7kX5ih1D3aR41cK+Dy/TFv78IhVY=; b=kyET35kpy/KbUcxv+lrTXXIJGUSbnFbG3IPFaNVNwz4llfRTdCvLSEAbLi607iYGqO zIgfqU7/jE7QnPHIqreF5MTaON+qiCXkVSPjw1QqddEfEJSp7n0ArqWJ/PQ8DG/LyMkO vM3ZEvdixlziHxRWkt/RHDNYcaE8PmOcOE1shQ5lsrtXbRkC6qqBw+btfUvcmHyBhiQY ZDLj9woA1RYcrLe3xs/E0eORhg/u94nwTrmuZ/znpDa7V6vd2MoSveL8zXlwCBrC61i+ MKTDRVBcGrsFy+3lFbNl5spj0jr72ssc750phIiFD8ROemfZWnGJmgEvH60gmMbyaZY4 UkQg== X-Gm-Message-State: AOAM531ZIuSK428TMizggvYEe94YEVKUow+pGFIePVNCJf0FYigWMCos ChnId5vK7wY5bgBxcZUPmW+9EQAXvafNolRB110= X-Received: by 2002:a02:bb8d:: with SMTP id g13mr5383663jan.103.1642208562404; Fri, 14 Jan 2022 17:02:42 -0800 (PST) MIME-Version: 1.0 References: <164199616622.1247129.783024987490980883.stgit@devnote2> <20220114234704.41f28e8b5e63368c655d848e@kernel.org> In-Reply-To: From: Andrii Nakryiko Date: Fri, 14 Jan 2022 17:02:31 -0800 Message-ID: Subject: Re: [RFC PATCH v2 0/8] fprobe: Introduce fprobe function entry/exit probe To: Jiri Olsa Cc: Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Networking , bpf , lkml , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Steven Rostedt , "Naveen N . Rao" , Anil S Keshavamurthy , "David S . Miller" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 14, 2022 at 7:10 AM Jiri Olsa wrote: > > On Fri, Jan 14, 2022 at 11:47:04PM +0900, Masami Hiramatsu wrote: > > Hi Jiri and Alexei, > > > > On Thu, 13 Jan 2022 13:27:34 +0100 > > Jiri Olsa wrote: > > > > > On Wed, Jan 12, 2022 at 05:01:15PM +0100, Jiri Olsa wrote: > > > > On Wed, Jan 12, 2022 at 11:02:46PM +0900, Masami Hiramatsu wrote: > > > > > Hi Jiri and Alexei, > > > > > > > > > > Here is the 2nd version of fprobe. This version uses the > > > > > ftrace_set_filter_ips() for reducing the registering overhead. > > > > > Note that this also drops per-probe point private data, which > > > > > is not used anyway. > > > > > > > > > > This introduces the fprobe, the function entry/exit probe with > > > > > multiple probe point support. This also introduces the rethook > > > > > for hooking function return as same as kretprobe does. This > > > > > > > > nice, I was going through the multi-user-graph support > > > > and was wondering that this might be a better way > > > > > > > > > abstraction will help us to generalize the fgraph tracer, > > > > > because we can just switch it from rethook in fprobe, depending > > > > > on the kernel configuration. > > > > > > > > > > The patch [1/8] and [7/8] are from your series[1]. Other libbpf > > > > > patches will not be affected by this change. > > > > > > > > I'll try the bpf selftests on top of this > > > > > > I'm getting crash and stall when running bpf selftests, > > > the fprobe sample module works fine, I'll check on that > > > > I've tried to build tools/testing/selftests/bpf on my machine, > > but I got below errors. Would you know how I can setup to build > > the bpf selftests correctly? (I tried "make M=samples/bpf", but same result) > > what's your clang version? your distro might be behind, If you have very recent Clang, decently recent pahole, and qemu, try using vmtest.sh. That should build the kernel with all the necessary kernel config options and start qemu image with that latest image and build selftests. And even run selftests automatically. > I'm using clang 14 compiled from sources: > > $ /opt/clang/bin/clang --version > clang version 14.0.0 (https://github.com/llvm/llvm-project.git 9f8ffaaa0bddcefeec15a3df9858fd50b05fcbae) > Target: x86_64-unknown-linux-gnu > Thread model: posix > InstalledDir: /opt/clang/bin > > and compiling bpf selftests with: > > $ CLANG=/opt/clang/bin/clang make > > jirka > > > > [...] > > > > Thank you, > > > > -- > > Masami Hiramatsu > > >