From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH net-next v4 1/2] bpf/tracing: allow user space to query prog array on the same tp Date: Tue, 12 Dec 2017 08:54:25 -0800 Message-ID: <0f22c5f6-95a5-b140-ac6d-3e8eebba5b78@fb.com> References: <20171211193903.2428317-1-yhs@fb.com> <20171211193903.2428317-2-yhs@fb.com> <20171212090331.umlkvftrm3helfww@hirez.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , To: Peter Zijlstra , Yonghong Song Return-path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:51372 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752126AbdLLQzM (ORCPT ); Tue, 12 Dec 2017 11:55:12 -0500 In-Reply-To: <20171212090331.umlkvftrm3helfww@hirez.programming.kicks-ass.net> Sender: netdev-owner@vger.kernel.org List-ID: On 12/12/17 1:03 AM, Peter Zijlstra wrote: > On Mon, Dec 11, 2017 at 11:39:02AM -0800, Yonghong Song wrote: >> The usage: >> struct perf_event_query_bpf *query = malloc(...); >> query.ids_len = ids_len; >> err = ioctl(pmu_efd, PERF_EVENT_IOC_QUERY_BPF, &query); > > You didn't spot the fixes to your changelog ;-) The above should read > something like: > > struct perf_event_query_bpf *query = > malloc(sizeof(*query) + sizeof(u32) * ids_len); > query->ids_len = ids_len; > err = ioctl(pmu_efd, PERF_EVENT_IOC_QUERY_BPF, query); sure. I fixed up this nit in commit log of patch 1 and in test_progs.c of patch 2.