Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp34257ybi; Tue, 16 Jul 2019 15:42:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1A5KUAq7BboZ8MfLk5GqVMqP0lQ5X59xvMraq+dRZSmAYtHaP48cV+K8YfGm9zrWOeA6b X-Received: by 2002:a65:610a:: with SMTP id z10mr36966287pgu.178.1563316951834; Tue, 16 Jul 2019 15:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563316951; cv=none; d=google.com; s=arc-20160816; b=0CWkkYKQw8fSciG7qIKtMlKZ8fiKSBiQ7R2x9EUM3kyHyOLByUelkGWcTsG5EbouV2 cQl/13/8pIQ3Xglbm6zSCdlFWTNkTXHSBDCYaFt6wQGD5Spehd4Bes7R+34KCXFb6CIY KAYjJX1fexVVS7CzraILZuOydS6qWcsGfL30gn/kXc1w78Kb9m2rxhVkPivTruSSrDOd r6IuKVoEksKxbm5YVIsnjYkg9wZn+jY4Lvxu0rZFJAbUtZJbm9fTJxql3DdG5G4ALMc+ qqSJN7HY3U/EB5gercBKnKPQIcb/L++bqrwqsOJhgFYKAHLqCMoD5nL6wO2ltLGRY/ZX mVFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DGWXFIfIr7/IFH288mFlt26MHGG0aBhmbsLutWSVGes=; b=xBj+I6eCrcVQoxsD32I2solMoRcibNgJwCWMg31FKKLTryL3Cj/GHIYCjVdijbyAfy EOJGF6Po09TVARJDfjD49KxdvjVPQLlpmzWfwUUMUPTNGDsY4tu9GSR0jzKNpeMYPGkE szgpjq2O5E48ppNINCqfK69WdE6q/LKeNsb7ajovDslsCqE7f6pmiludHUnqXqJ9hlq8 J25CIqyqdEvioVAbSB9MOE/oMzDd5+t61yOcN5Tb/u0aygU96yFZkTppXg1iKHN3lZ9n 1/VpsVUEW/9zQ52A3DaJ0lUiC0FYTrCXHweRmHbJPandorwGqgKyWmB6FYJjqty2RNqY qjrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=EcohRi1m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si10964465pgm.357.2019.07.16.15.42.13; Tue, 16 Jul 2019 15:42:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=EcohRi1m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388133AbfGPWly (ORCPT + 99 others); Tue, 16 Jul 2019 18:41:54 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37828 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728235AbfGPWly (ORCPT ); Tue, 16 Jul 2019 18:41:54 -0400 Received: by mail-pf1-f193.google.com with SMTP id 19so9807084pfa.4 for ; Tue, 16 Jul 2019 15:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DGWXFIfIr7/IFH288mFlt26MHGG0aBhmbsLutWSVGes=; b=EcohRi1mZ4EKL6fwSiAwLWMcin7sZI+MIk6GCtiDhRSMgWytraFqoXaoMFt+sbbrmE oHi2Lcvn9GOyVANvC0LB1lm5QZolkzZfux4aeLYce0/r0oOt5wzbHM50iaMO6QGv+zkS XrbhX93qjQC/C2ig8+xzL9NrBodFi1QjO+wxs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=DGWXFIfIr7/IFH288mFlt26MHGG0aBhmbsLutWSVGes=; b=mI7LY6UAi+B4pymVnLXkiZtfIOzQdEHL+3nhuhwEhWTDalLJ2CoSGnh/TRVZwIi3Lo YByHA/niW8JHsMZU5Dhd528CuRju1P39DNJXrRRc0YkHrJO3GjL7j39qQTAMdAo2RxFF 2LnUr62RN20WMjJBu6rfj62aq0HZM4D4LUUbVKCqpd/EzgDrw9vwrV0oG6ddqH08JC06 aLRaybwh5LC8YThYSJCaSQFpiYn6VHMmGhcqT38PhtYGrIH+xkoAGGnW6mZ6W5CFi3je cRVzlVd4t5V7ru1gBdRSt3u9oG7ep2GntvzBqRcJxOa5bB6XO7+eyPXHS9McOJDTWkve WzKA== X-Gm-Message-State: APjAAAXMl122GA04drWtfidDpazAX3QI+SwNyd1lZbzFvr+DkxOmjzVf XpstguhkaAszLLUkpcxieIk= X-Received: by 2002:a63:ed50:: with SMTP id m16mr3698792pgk.209.1563316913467; Tue, 16 Jul 2019 15:41:53 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id x14sm24967454pfq.158.2019.07.16.15.41.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 15:41:52 -0700 (PDT) Date: Tue, 16 Jul 2019 18:41:50 -0400 From: Joel Fernandes To: Alexei Starovoitov Cc: linux-kernel@vger.kernel.org, Adrian Ratiu , Alexei Starovoitov , bpf@vger.kernel.org, Brendan Gregg , connoro@google.com, Daniel Borkmann , duyuchao , Ingo Molnar , jeffv@google.com, Karim Yaghmour , kernel-team@android.com, linux-kselftest@vger.kernel.org, Manali Shukla , Manjo Raja Rao , Martin KaFai Lau , Masami Hiramatsu , Matt Mullins , Michal Gregorczyk , Michal Gregorczyk , Mohammad Husain , namhyung@google.com, namhyung@kernel.org, netdev@vger.kernel.org, paul.chaignon@gmail.com, primiano@google.com, Qais Yousef , Shuah Khan , Song Liu , Srinivas Ramana , Steven Rostedt , Tamir Carmeli , Yonghong Song Subject: Re: [PATCH RFC 0/4] Add support to directly attach BPF program to ftrace Message-ID: <20190716224150.GC172157@google.com> References: <20190710141548.132193-1-joel@joelfernandes.org> <20190716205455.iimn3pqpvsc3k4ry@ast-mbp.dhcp.thefacebook.com> <20190716213050.GA161922@google.com> <20190716222650.tk2coihjtsxszarf@ast-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190716222650.tk2coihjtsxszarf@ast-mbp.dhcp.thefacebook.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 16, 2019 at 03:26:52PM -0700, Alexei Starovoitov wrote: > On Tue, Jul 16, 2019 at 05:30:50PM -0400, Joel Fernandes wrote: > > > > I also thought about the pinning idea before, but we also want to add support > > for not just raw tracepoints, but also regular tracepoints (events if you > > will). I am hesitant to add a new BPF API just for creating regular > > tracepoints and then pinning those as well. > > and they should be done through the pinning as well. Hmm ok, I will give it some more thought. > > I don't see why a new bpf node for a trace event is a bad idea, really. > > See the patches for kprobe/uprobe FD-based api and the reasons behind it. > tldr: text is racy, doesn't scale, poor security, etc. Is it possible to use perf without CAP_SYS_ADMIN and control security at the per-event level? We are selective about who can access which event, using selinux. That's how our ftrace-based tracers work. Its fine grained per-event control. That's where I was going with the tracefs approach since we get that granularity using the file system. Thanks.