From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnaldo Carvalho de Melo Subject: Re: [PATCH v4 2/9] perf/core: open access for CAP_SYS_PERFMON privileged process Date: Fri, 10 Jan 2020 13:45:31 -0300 Message-ID: <20200110164531.GA2598@kernel.org> References: <20200108160713.GI2844@hirez.programming.kicks-ass.net> <20200110140234.GO2844@hirez.programming.kicks-ass.net> <20200111005213.6dfd98fb36ace098004bde0e@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20200111005213.6dfd98fb36ace098004bde0e@kernel.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane-mx.org@lists.infradead.org To: Masami Hiramatsu Cc: Mark Rutland , Song Liu , Peter Zijlstra , Benjamin Herrenschmidt , "joonas.lahtinen@linux.intel.com" , Will Deacon , Alexei Starovoitov , Stephane Eranian , "james.bottomley@hansenpartnership.com" , Paul Mackerras , Jiri Olsa , Andi Kleen , Michael Ellerman , Alexey Budankov , Igor Lubashev , James Morris , Alexander Shishkin , Ingo Molnar , oprofile-list@lists.sf.net, Serge Hallyn , Robert Richter , Kees Cook List-Id: linux-perf-users.vger.kernel.org Em Sat, Jan 11, 2020 at 12:52:13AM +0900, Masami Hiramatsu escreveu: > On Fri, 10 Jan 2020 15:02:34 +0100 Peter Zijlstra wrote: > > Again, this only allows attaching to previously created kprobes, it does > > not allow creating kprobes, right? > > That is; I don't think CAP_SYS_PERFMON should be allowed to create > > kprobes. > > As might be clear; I don't actually know what the user-ABI is for > > creating kprobes. > There are 2 ABIs nowadays, ftrace and ebpf. perf-probe uses ftrace interface to > define new kprobe events, and those events are treated as completely same as > tracepoint events. On the other hand, ebpf tries to define new probe event > via perf_event interface. Above one is that interface. IOW, it creates new kprobe. Masami, any plans to make 'perf probe' use the perf_event_open() interface for creating kprobes/uprobes? - Arnaldo