From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751297AbdKVFAv (ORCPT ); Wed, 22 Nov 2017 00:00:51 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:45428 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750959AbdKVFAu (ORCPT ); Wed, 22 Nov 2017 00:00:50 -0500 X-Google-Smtp-Source: AGs4zMYcPca61aUdwJXxtT6szFxKhNz5KFCT5/im103A/IbjYRQbhHt8WBN0m8X9DEgntQSaHcAxXg== Date: Tue, 21 Nov 2017 21:00:47 -0800 From: Alexei Starovoitov To: Song Liu Cc: peterz@infradead.org, rostedt@goodmis.org, mingo@redhat.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, daniel@iogearbox.net, kernel-team@fb.com Subject: Re: [PATCH 0/6] enable creating [k,u]probe with perf_event_open Message-ID: <20171122050045.cjt4legewplt3yet@ast-mbp> References: <20171115172339.1791161-1-songliubraving@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171115172339.1791161-1-songliubraving@fb.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 15, 2017 at 09:23:31AM -0800, Song Liu wrote: > Changes RFC v2 to PATCH v1: > Check type PERF_TYPE_PROBE in perf_event_set_filter(). > Rebase on to tip perf/core. > > Changes RFC v1 to RFC v2: > Fix build issue reported by kbuild test bot by adding ifdef of > CONFIG_KPROBE_EVENTS, and CONFIG_UPROBE_EVENTS. > > RFC v1 cover letter: > > This is to follow up the discussion over "new kprobe api" at Linux > Plumbers 2017: > > With current kernel, user space tools can only create/destroy [k,u]probes > with a text-based API (kprobe_events and uprobe_events in tracefs). This > approach relies on user space to clean up the [k,u]probe after using them. > However, this is not easy for user space to clean up properly. > > To solve this problem, we introduce a file descriptor based API. > Specifically, we extended perf_event_open to create [k,u]probe, and attach > this [k,u]probe to the file descriptor created by perf_event_open. These > [k,u]probe are associated with this file descriptor, so they are not > available in tracefs. Peter, Ingo, could you please review the proposed perf_event_open api extension?