Received: by 2002:a17:90a:2044:0:0:0:0 with SMTP id n62csp1290581pjc; Wed, 22 May 2019 13:19:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyXzJ1h2wTKwBsaJoD3lI3djTfUAyja2ZgYTqgtyCeI7IsM3UHdjFbSdGnkEIISnhxxgd5 X-Received: by 2002:a17:902:b204:: with SMTP id t4mr40905373plr.285.1558556355373; Wed, 22 May 2019 13:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558556355; cv=none; d=google.com; s=arc-20160816; b=kdf44mp+cRUAzKwv/elUbsSNXnYNqxyvQ6fWoB/CLkz4PYo2QMrsBV2A9jjFK4MHuF pkfCYe5PyGZn3U1W8vBeFEm7vgtAwYf9tYFRLNBeOfIlePJAaJ3dLQ8TsaTmeTJE41zT KTpHpL5gvkTwt2Hr4YhdvWpfwhSrAz31du7j0cHUe3bheXpEl38/ycJbwjGQY+/7g1k3 Joi8CmQRZhcx4TWuJ2KxchzFc3PtfomytKbajRosX7uIPBjLS7BRrajcGRB9eAyhyW9r mMlYAkqnw7WCkz2vxPHrJcdoULWAiJ/9O+oxIPUYIjVsS6ymZuvmJ16CyaXvt6d1miis oa8w== 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=LFtb1aLHAoniHgO1XVMl+H7og93sXsDQP7kXz4xastQ=; b=ee6MxKuS3ojTjaDplSmB4+4jbcKzpthQhaPB4hjra6XMC1iaOp5sCvctCygQP0Fp2+ rau50v73Zkoln22/mHJlD3HvvKH238T9cr/Bpc8LKVdRT0tgWQ+CaPnzuzhsSIqWSyhD fu2PiLsmWm9yuaFwGMPxD7v48Z/E3evJZ50mRTaEqMI7zNDLrA9OLbDbRmcakaauSAOw xlZ0uaOQlz/FY+IAGEQNhjcLDJWD6xQCa5c21Pvh4gpdZcz+LlOrcggFQTHWiN2yHXpo bJnGZZ6dluqftAHG+R82tcW7rr3X4PiGkXHjjYWfFbC9272x5CsRkz+8+hqlHfrsDcTv Eb6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pwyuDal8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si28511281pgt.93.2019.05.22.13.18.59; Wed, 22 May 2019 13:19:15 -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=@gmail.com header.s=20161025 header.b=pwyuDal8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729998AbfEVUQ3 (ORCPT + 99 others); Wed, 22 May 2019 16:16:29 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:39638 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729632AbfEVUQ3 (ORCPT ); Wed, 22 May 2019 16:16:29 -0400 Received: by mail-pl1-f196.google.com with SMTP id g9so1595673plm.6; Wed, 22 May 2019 13:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LFtb1aLHAoniHgO1XVMl+H7og93sXsDQP7kXz4xastQ=; b=pwyuDal8T9u/cMqXs0chOoAJnigbdDXf4erfNfREXXtF8b+s/I+NI1yQrJ5h2YE2x3 J13plfkrlSBxLPtAP73cIifjo2DjFZlHFafe9g0E9WWP4fjLgyRuHTbNzrr4mWKQpXEr O6NtOiEswNSbAzDyXKMO70at36tfMUOW/NUs0CNQIOf3hpolRdnl5VsCx0pZY8TCq7yd J9sHu7nb7mMwIgJYSQYczgarQ85hRQstISHy2Rt+Oe4Fx3U1j74ULR8G0QYiCWemP8+o AO2d3JYkhGVQ3jO27y0Lerk/ptCZ3AafxTBUOhjrfOJzKFs9V/vfrjOnUgHpfZU5Elts X1VQ== 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=LFtb1aLHAoniHgO1XVMl+H7og93sXsDQP7kXz4xastQ=; b=o8/+fhG15A95IoOCRkaqW+lFGiGwVx7+Gc3g9hb+SV1nq2HQ6bGL758ri/C4aOcrpP NgKtdCiVtJsHy9uoK0KrgNDxaI+I11x1YdEr3ThMqIio+r1Ar2uNgPXitzsW1JLArJt/ GQWuoFPtjkvE1UTng/nmb6wpMF/xMBYSiGESTH9zJGey2fv5N5/kATw5OvF+DlTeyDIb PpYBhnxOT520MEb/Tnsr+HyBhaJc+7OE7DmrczKDvd5a+p8XwxUe/6xGd4PgQpbYwJBg uWVFnCa86a3kK4LxHx8t2aNkZZdQf4Le76Hjz+hePmIeh/hok+arL6onJ/Pn6eUdvFi5 9sig== X-Gm-Message-State: APjAAAUl0jwR4T5t1i7qYXG21cLOLcSGrMbA+XpxnA6GRi/MVeshxy55 ccqYK9RAOIdACoM7EgdHEF8= X-Received: by 2002:a17:902:ac90:: with SMTP id h16mr29233951plr.162.1558556188297; Wed, 22 May 2019 13:16:28 -0700 (PDT) Received: from ast-mbp.dhcp.thefacebook.com ([2620:10d:c090:180::6565]) by smtp.gmail.com with ESMTPSA id q5sm30530958pfb.51.2019.05.22.13.16.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 13:16:27 -0700 (PDT) Date: Wed, 22 May 2019 13:16:25 -0700 From: Alexei Starovoitov To: Kris Van Hees Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, dtrace-devel@oss.oracle.com, linux-kernel@vger.kernel.org, rostedt@goodmis.org, mhiramat@kernel.org, acme@kernel.org, ast@kernel.org, daniel@iogearbox.net, peterz@infradead.org Subject: Re: [RFC PATCH 00/11] bpf, trace, dtrace: DTrace BPF program type implementation and sample use Message-ID: <20190522201624.eza3pe2v55sn2t2w@ast-mbp.dhcp.thefacebook.com> References: <201905202347.x4KNl0cs030532@aserv0121.oracle.com> <20190521175617.ipry6ue7o24a2e6n@ast-mbp.dhcp.thefacebook.com> <20190521184137.GH2422@oracle.com> <20190521205533.evfszcjvdouby7vp@ast-mbp.dhcp.thefacebook.com> <20190521213648.GK2422@oracle.com> <20190521232618.xyo6w3e6nkwu3h5v@ast-mbp.dhcp.thefacebook.com> <20190522041253.GM2422@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190522041253.GM2422@oracle.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 22, 2019 at 12:12:53AM -0400, Kris Van Hees wrote: > > Could you elaborate on why you believe my patches are not adding generic > features? I can certainly agree that the DTrace-specific portions are less > generic (although they are certainly available for anyone to use), but I > don't quite understand why the new features are deemed non-generic and why > you believe no one else can use this? And once again your statement above contradicts your own patches. The patch 2 adds new prog type BPF_PROG_TYPE_DTRACE and the rest of the patches are tying everything to it. This approach contradicts bpf philosophy of being generic execution engine and not favoriting one program type vs another. I have nothing against dtrace language and dtrace scripts. Go ahead and compile them into bpf. All patches to improve bpf infrastructure are very welcomed. In particular you brought up a good point that there is a use case for sharing a piece of bpf program between kprobe and tracepoint events. The better way to do that is via bpf2bpf call. Example: void bpf_subprog(arbitrary args) { } SEC("kprobe/__set_task_comm") int bpf_prog_kprobe(struct pt_regs *ctx) { bpf_subprog(...); } SEC("tracepoint/sched/sched_switch") int bpf_prog_tracepoint(struct sched_switch_args *ctx) { bpf_subprog(...); } Such configuration is not supported by the verifier yet. We've been discussing it for some time, but no work has started, since there was no concrete use case. If you can work on adding support for it everyone will benefit. Could you please consider doing that as a step forward?