Re: consistency for statistics with XDP mode

2018-12-03 Thread Arnaldo Carvalho de Melo
Em Mon, Dec 03, 2018 at 11:30:01AM -0800, David Miller escreveu: > From: David Ahern > Date: Mon, 3 Dec 2018 08:45:12 -0700 > > > On 12/1/18 4:22 AM, Jesper Dangaard Brouer wrote: > >> IMHO XDP_DROP should not be accounted as netdev stats drops, this is a > >> user installed program like

Re: Help with the BPF verifier

2018-11-05 Thread Arnaldo Carvalho de Melo
Em Fri, Nov 02, 2018 at 09:27:52PM +, Yonghong Song escreveu: > > > On 11/2/18 8:42 AM, Edward Cree wrote: > > On 02/11/18 15:02, Arnaldo Carvalho de Melo wrote: > >> Yeah, didn't work as well: > > > >> And the -vv in 'perf trace' didn't seem to ma

Re: Help with the BPF verifier

2018-11-03 Thread Arnaldo Carvalho de Melo
Em Sat, Nov 03, 2018 at 08:29:34AM -0300, Arnaldo Carvalho de Melo escreveu: > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > Preprocessed source(s) and associated run script(s) are located at: > clang-7: note: diagnostic msg: /tmp/augmented_raw_syscalls-7444d9.c > c

Re: Help with the BPF verifier

2018-11-03 Thread Arnaldo Carvalho de Melo
Em Fri, Nov 02, 2018 at 03:42:49PM +, Edward Cree escreveu: > On 02/11/18 15:02, Arnaldo Carvalho de Melo wrote: > > Yeah, didn't work as well: > > > And the -vv in 'perf trace' didn't seem to map to further details in the > > output of the verifier debug: > Yeah f

Re: Help with the BPF verifier

2018-11-02 Thread Arnaldo Carvalho de Melo
Em Thu, Nov 01, 2018 at 08:05:07PM +, Edward Cree escreveu: > On 01/11/18 18:52, Arnaldo Carvalho de Melo wrote: > > R0=inv(id=0) R1=inv6 R2=inv6 R3=inv(id=0) R6=ctx(id=0,off=0,imm=0) > > R7=inv64 R10=fp0,call_-1 > > 15: (b7) r2 = 0 > > 16: (63) *(u32 *)(r10 -260)

Re: [PATCH bpf 1/4] bpf: fix partial copy of map_ptr when dst is scalar

2018-11-01 Thread Arnaldo Carvalho de Melo
Em Thu, Nov 01, 2018 at 07:17:29PM +, Edward Cree escreveu: > On 31/10/18 23:05, Daniel Borkmann wrote: > > ALU operations on pointers such as scalar_reg += map_value_ptr are > > handled in adjust_ptr_min_max_vals(). Problem is however that map_ptr > > and range in the register state share a

Re: Help with the BPF verifier

2018-11-01 Thread Arnaldo Carvalho de Melo
Em Thu, Nov 01, 2018 at 12:10:39PM -0700, David Miller escreveu: > From: Arnaldo Carvalho de Melo > Date: Thu, 1 Nov 2018 15:52:17 -0300 > > > 50 unsigned int filename_arg = 6; > ... > > --- /wb/augmented_raw_syscalls.c.old2018-11-01 15:43

Help with the BPF verifier

2018-11-01 Thread Arnaldo Carvalho de Melo
tl;dr: I seem to be trying to get past clang optimizations that get the verifier to accept my proggie. Hi, So I'm moving to use raw_syscalls:sys_exit to collect pointer contents, using maps to tell the bpf program what to copy, how many bytes, filters, etc. I'm at the

Re: [PATCH bpf] libbpf: Fix compile error in libbpf_attach_type_by_name

2018-10-31 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 31, 2018 at 12:57:18PM -0700, Andrey Ignatov escreveu: > Arnaldo Carvalho de Melo reported build error in libbpf when clang > version 3.8.1-24 (tags/RELEASE_381/final) is used: > > libbpf.c:2201:36: error: comparison of constant -22 with expression of > t

libbpf build failure on debian:9 with clang

2018-10-31 Thread Arnaldo Carvalho de Melo
1740.66 debian:9 : FAIL gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 The failure was with clang tho: clang version 3.8.1-24 (tags/RELEASE_381/final) With: gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) it built without any warnings/errors. CC

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-10-17 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 17, 2018 at 07:08:37PM +, Alexei Starovoitov escreveu: > On 10/17/18 11:53 AM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Oct 17, 2018 at 04:36:08PM +, Alexei Starovoitov escreveu: > >> On 10/17/18 8:09 AM, David Ahern wrote: > >>> On 10/

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-10-17 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 17, 2018 at 04:36:08PM +, Alexei Starovoitov escreveu: > On 10/17/18 8:09 AM, David Ahern wrote: > > On 10/16/18 11:43 PM, Song Liu wrote: > >> I agree that processing events while recording has significant overhead. > >> In this case, perf user space need to know details about the

Re: [PATCH bpf-next 0/3] improve and fix barriers for walking perf rb

2018-10-17 Thread Arnaldo Carvalho de Melo
nel/events/ring_buffer.c the corresponding code in tools/ should've been changed :-) Acked-by: Arnaldo Carvalho de Melo - Arnaldo > Thanks! > > Daniel Borkmann (3): > tools: add smp_* barrier variants to include infrastructure > tools, perf: use smp_{rmb,mb} barriers instead

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-10-17 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 17, 2018 at 09:11:40AM -0300, Arnaldo Carvalho de Melo escreveu: > Adding Alexey, Jiri and Namhyung as they worked/are working on > multithreading 'perf record'. > > Em Tue, Oct 16, 2018 at 11:43:11PM -0700, Song Liu escreveu: > > On Tue, Oct 16, 2018 at 4:43 PM

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-10-17 Thread Arnaldo Carvalho de Melo
Adding Alexey, Jiri and Namhyung as they worked/are working on multithreading 'perf record'. Em Tue, Oct 16, 2018 at 11:43:11PM -0700, Song Liu escreveu: > On Tue, Oct 16, 2018 at 4:43 PM David Ahern wrote: > > On 10/15/18 4:33 PM, Song Liu wrote: > > > I am working with Alexei on the idea of

Re: [PATCH bpf-next] bpf: emit audit messages upon successful prog load and unload

2018-10-05 Thread Arnaldo Carvalho de Melo
Em Fri, Oct 05, 2018 at 11:44:35AM -0700, Alexei Starovoitov escreveu: > On Fri, Oct 05, 2018 at 08:14:09AM +0200, Jiri Olsa wrote: > > On Thu, Oct 04, 2018 at 03:10:15PM -0700, Alexei Starovoitov wrote: > > > On Thu, Oct 04, 2018 at 10:22:31PM +0200, Jesper Dangaard Brouer wrote: > > > > My

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-09-21 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 20, 2018 at 08:14:46PM -0700, Alexei Starovoitov escreveu: > On Thu, Sep 20, 2018 at 03:56:51PM +0200, Peter Zijlstra wrote: > > On Thu, Sep 20, 2018 at 10:25:45AM -0300, Arnaldo Carvalho de Melo wrote: > > > PeterZ provided a patch introducing PERF_RECORD_MUNMAP

Re: [PATCH perf 3/3] tools/perf: recognize and process RECORD_MMAP events for bpf progs

2018-09-20 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 20, 2018 at 10:36:17AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Sep 19, 2018 at 03:39:35PM -0700, Alexei Starovoitov escreveu: > > Recognize JITed bpf prog load/unload events. > > Add/remove kernel symbols accordingly. > > > > Signed

Re: [PATCH perf 3/3] tools/perf: recognize and process RECORD_MMAP events for bpf progs

2018-09-20 Thread Arnaldo Carvalho de Melo
Em Wed, Sep 19, 2018 at 03:39:35PM -0700, Alexei Starovoitov escreveu: > Recognize JITed bpf prog load/unload events. > Add/remove kernel symbols accordingly. > > Signed-off-by: Alexei Starovoitov > --- > tools/perf/util/machine.c | 27 +++ > tools/perf/util/symbol.c |

Re: [PATCH bpf-next 2/3] bpf: emit RECORD_MMAP events for bpf prog load/unload

2018-09-20 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 20, 2018 at 10:44:24AM +0200, Peter Zijlstra escreveu: > On Wed, Sep 19, 2018 at 03:39:34PM -0700, Alexei Starovoitov wrote: > > void bpf_prog_kallsyms_del(struct bpf_prog *fp) > > { > > + unsigned long symbol_start, symbol_end; > > + /* mmap_record.filename cannot be NULL and

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-15 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 09:56:43PM -0700, Yonghong Song escreveu: > I really want to get rid of this option as well. To make pahole work > with the default default format, I need to add bpf support to > libdwfl in elfutils repo. I will work on that. Right, I haven't looked into detail, but

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 02:47:59PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu: > > On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote: > > > Just out of curiosity, is there any plan to have this as a clan

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu: > On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote: > > Just out of curiosity, is there any plan to have this as a clang option? > I think > clang ... -mllvm -mattr=dwarfris > should work. [ro

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 10:21:30AM -0700, Alexei Starovoitov escreveu: > On 6/14/18 10:18 AM, Arnaldo Carvalho de Melo wrote: > > > > Just out of curiosity, is there any plan to have this as a clang option? > > I think > clang ... -mllvm -mattr=dwarfris thanks, trying... - Arnaldo

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 14, 2018 at 09:22:27AM -0700, Martin KaFai Lau escreveu: > On Thu, Jun 14, 2018 at 12:03:34PM -0300, Arnaldo Carvalho de Melo wrote: > > > > > > > 1. The tools/testing/selftests/bpf/Makefile has the CLANG_FLAGS and > > > > > >LLC_FLAGS ne

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-14 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 13, 2018 at 04:26:38PM -0700, Martin KaFai Lau escreveu: > On Tue, Jun 12, 2018 at 05:41:26PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jun 12, 2018 at 05:31:24PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Thu, Jun 07, 2018 at 01:07:01PM -0700

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-12 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 12, 2018 at 05:31:24PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Jun 07, 2018 at 01:07:01PM -0700, Martin KaFai Lau escreveu: > > On Thu, Jun 07, 2018 at 04:30:29PM -0300, Arnaldo Carvalho de Melo wrote: > > > So this must be available in a newer llvm

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-12 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 07, 2018 at 01:07:01PM -0700, Martin KaFai Lau escreveu: > On Thu, Jun 07, 2018 at 04:30:29PM -0300, Arnaldo Carvalho de Melo wrote: > > So this must be available in a newer llvm version? Which one? > I should have put in the details in my last email or > in the commit

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-07 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 07, 2018 at 01:07:01PM -0700, Martin KaFai Lau escreveu: > On Thu, Jun 07, 2018 at 04:30:29PM -0300, Arnaldo Carvalho de Melo wrote: > > So this must be available in a newer llvm version? Which one? > I should have put in the details in my last email or > in the commit

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-07 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 07, 2018 at 12:05:10PM -0700, Martin KaFai Lau escreveu: > On Thu, Jun 07, 2018 at 11:03:37AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Thu, Jun 07, 2018 at 10:54:01AM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Tue, Jun 05, 2018 at 02:25:48PM -0700

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-07 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 07, 2018 at 10:54:01AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Jun 05, 2018 at 02:25:48PM -0700, Martin KaFai Lau escreveu: > > [ btw, the latest commit (1 commit) should be 94a11b59e592 ]. So, the commit log message for the pahole patch is non-existen

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-07 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 05, 2018 at 02:25:48PM -0700, Martin KaFai Lau escreveu: > On Thu, Apr 19, 2018 at 04:40:34PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Wed, Apr 18, 2018 at 03:55:56PM -0700, Martin KaFai Lau escreveu: > > > This patch introduces BPF Type Format (BTF). > >

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-06-06 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 05, 2018 at 02:25:48PM -0700, Martin KaFai Lau escreveu: > On Thu, Apr 19, 2018 at 04:40:34PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Wed, Apr 18, 2018 at 03:55:56PM -0700, Martin KaFai Lau escreveu: > > > This patch introduces BPF Type Format (BTF). > >

[GIT PULL 00/11] perf/core improvements and fixes

2018-05-16 Thread Arnaldo Carvalho de Melo
avoiding regressions in the events parser such as one that caused a revert in v4.17-rc (Arnaldo Carvalho de Melo) - Fix NULL return handling in bpf__prepare_load() (YueHaibing) - Warn about 'perf buildid-cache --purge-all' failures (Ravi Bangoria) - Add infrastructure to help in writing eBPF C

[PATCH 11/11] perf bpf: Fix NULL return handling in bpf__prepare_load()

2018-05-16 Thread Arnaldo Carvalho de Melo
orkmann <dan...@iogearbox.net> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: netdev@vger.kernel.org Link: https://lkml.kernel.org/n/tip-psf4xwc09n62al2cb9s33...@git.kernel.org Sig

Re: [PATCH bpf] tools: bpf: fix NULL return handling in bpf__prepare_load

2018-05-15 Thread Arnaldo Carvalho de Melo
Em Sun, May 13, 2018 at 01:20:22AM +0200, Daniel Borkmann escreveu: > [ +Arnaldo ] > > On 05/11/2018 01:21 PM, YueHaibing wrote: > > bpf_object__open()/bpf_object__open_buffer can return error pointer or NULL, > > check the return values with IS_ERR_OR_NULL() in bpf__prepare_load and > >

Re: [PATCH bpf-next v5 00/10] BTF: BPF Type Format

2018-04-19 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 18, 2018 at 03:55:56PM -0700, Martin KaFai Lau escreveu: > This patch introduces BPF Type Format (BTF). > > BTF (BPF Type Format) is the meta data format which describes > the data types of BPF program/map. Hence, it basically focus > on the C programming language which the modern

Re: [PATCH bpf-next v3 00/10] BTF: BPF Type Format

2018-04-16 Thread Arnaldo Carvalho de Melo
Em Mon, Apr 16, 2018 at 12:33:17PM -0700, Martin KaFai Lau escreveu: > This patch introduces BPF Type Format (BTF). > > BTF (BPF Type Format) is the meta data format which describes > the data types of BPF program/map. Hence, it basically focus > on the C programming language which the modern

Re: [PATCH bpf-next 00/10] BTF: BPF Type Format

2018-04-03 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 30, 2018 at 11:26:33AM -0700, Martin KaFai Lau escreveu: > This patch introduces BPF Type Format (BTF). > > BTF (BPF Type Format) is the meta data format which describes > the data types of BPF program/map. Hence, it basically focus > on the C programming language which the modern

Re: [PATCH bpf] tools: bpftool: fix compilation with older headers

2018-03-06 Thread Arnaldo Carvalho de Melo
[ +ingo, jolsa, namhyung ] Em Tue, Mar 06, 2018 at 05:28:33PM +0100, Daniel Borkmann escreveu: > [ +acme ] > > On 03/06/2018 05:00 PM, David Miller wrote: > > From: Jiri Benc > > Date: Tue, 6 Mar 2018 16:03:25 +0100 > > > >> On Tue, 6 Mar 2018 15:39:07 +0100, Daniel Borkmann

Re: [bpf-next V3 PATCH 1/5] bpf: Sync kernel ABI header with tooling header for bpf_common.h

2018-02-08 Thread Arnaldo Carvalho de Melo
Em Thu, Feb 08, 2018 at 12:48:12PM +0100, Jesper Dangaard Brouer escreveu: > I recently fixed up a lot of commits that forgot to keep the tooling > headers in sync. And then I forgot to do the same thing in commit > cb5f7334d479 ("bpf: add comments to BPF ld/ldx sizes"). Let correct > that before

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2018-01-22 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 22, 2018 at 10:28:11AM -0800, Yonghong Song escreveu: > The compiler did "40: (bf) r1 = r0" and then uses "r1" for branch > comparison, the original "r0" is left with complete unknown integer value > and later used to calculate the buffer size "55: (bf) r5 = r0" > where "r5" could be

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2018-01-22 Thread Arnaldo Carvalho de Melo
Em Wed, Nov 22, 2017 at 10:42:22AM -0800, Gianluca Borello escreveu: > On Tue, Nov 21, 2017 at 2:31 PM, Alexei Starovoitov > wrote: > > > > yeah sorry about this hack. Gianluca reported this issue as well. > > Yonghong fixed it for bpf_probe_read only. We will extend

Re: net-next libbpf broken on prev kernel release

2017-12-14 Thread Arnaldo Carvalho de Melo
Em Thu, Dec 14, 2017 at 10:52:19AM +0100, Daniel Borkmann escreveu: > [ +acme, +ast ] > > On 12/14/2017 10:16 AM, Eric Leblond wrote: > > Hello, > > > > It seems that the following patch did break libbpf (in net-next > > version) which is not able to load anymore a program on a 4.14: > > > >

Re: [PATCH net-next 2/2] tools: bpftool: create "uninstall", "doc-uninstall" make targets

2017-12-13 Thread Arnaldo Carvalho de Melo
stem before > we installed the program, and we do not wish to break other makefiles > that might assume their existence. Do remvoe /usr/local/share/man/man8 > if empty however, as this directory does not seem to exist by default. > > Signed-off-by: Quentin Monnet <quentin.mon...@n

Re: [PATCH/RFC] Re: 'perf test BPF' failing, libbpf regression wrt "basic API for BPF obj name"

2017-12-01 Thread Arnaldo Carvalho de Melo
Em Thu, Nov 30, 2017 at 01:51:15PM -0800, Alexei Starovoitov escreveu: > On 11/30/17 11:00 AM, Arnaldo Carvalho de Melo wrote: > > > Instead of sinking all future bpf_attr's backward compatibility > > > requirements to sys_bpf, I would push it up to its own BPF_* command &

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2017-11-21 Thread Arnaldo Carvalho de Melo
Em Tue, Nov 14, 2017 at 02:58:24PM -0800, Yonghong Song escreveu: > On 11/14/17 12:25 PM, Daniel Borkmann wrote: > > Yeah, I know, that's what I mentioned earlier in this thread to resolve it, > > but do we really want to add this hack everywhere? :( Potentially any > > function > > having

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2017-11-20 Thread Arnaldo Carvalho de Melo
Em Tue, Nov 14, 2017 at 09:25:17PM +0100, Daniel Borkmann escreveu: > On 11/14/2017 07:15 PM, Yonghong Song wrote: > > On 11/14/17 6:19 AM, Daniel Borkmann wrote: > >> On 11/14/2017 02:42 PM, Arnaldo Carvalho de Melo wrote: > >>> Em Tue, Nov 14, 2017 at 02:09:34PM +

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2017-11-14 Thread Arnaldo Carvalho de Melo
Em Tue, Nov 14, 2017 at 03:19:51PM +0100, Daniel Borkmann escreveu: > On 11/14/2017 02:42 PM, Arnaldo Carvalho de Melo wrote: > > Em Tue, Nov 14, 2017 at 02:09:34PM +0100, Daniel Borkmann escreveu: > >> On 11/14/2017 01:58 PM, Arnaldo Carvalho de Melo wrote: > >>

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2017-11-14 Thread Arnaldo Carvalho de Melo
Em Tue, Nov 14, 2017 at 02:09:34PM +0100, Daniel Borkmann escreveu: > On 11/14/2017 01:58 PM, Arnaldo Carvalho de Melo wrote: > > Em Tue, Nov 14, 2017 at 01:09:39AM +0100, Daniel Borkmann escreveu: > >> On 11/13/2017 04:08 PM, Arnaldo Carvalho de Melo wrote: > >>

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2017-11-14 Thread Arnaldo Carvalho de Melo
Em Tue, Nov 14, 2017 at 01:09:39AM +0100, Daniel Borkmann escreveu: > On 11/13/2017 04:08 PM, Arnaldo Carvalho de Melo wrote: > > libbpf: -- BEGIN DUMP LOG --- > > libbpf: > > 0: (79) r3 = *(u64 *)(r1 +104) > > 1: (b7) r2 = 0 > > 2: (bf) r6 = r1 > > 3: (bf

Re: len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2017-11-13 Thread Arnaldo Carvalho de Melo
Em Mon, Nov 13, 2017 at 03:56:14PM +0100, Daniel Borkmann escreveu: > On 11/13/2017 03:30 PM, Arnaldo Carvalho de Melo wrote: > > Hi, > > > > In a5e8c07059d0 ("bpf: add bpf_probe_read_str helper") you > > state: > > > >"T

len = bpf_probe_read_str(); bpf_perf_event_output(... len) == FAIL

2017-11-13 Thread Arnaldo Carvalho de Melo
Hi, In a5e8c07059d0 ("bpf: add bpf_probe_read_str helper") you state: "This is suboptimal because the size of the string needs to be estimated at compile time, causing more memory to be copied than often necessary, and can become more problematic if further processing on buf

bpf.h drift due to bpf_sk_redirect_map()

2017-10-26 Thread Arnaldo Carvalho de Melo
Hi John, Recently the tools/perf/ build system noticed drift in tools/include/uapi/linux/bpf.h from its master copy include/uapi/linux/bpf.h, which comes from changes from you, can you please check this? [acme@jouet linux]$ diff -u tools/include/uapi/linux/bpf.h include/uapi/linux/bpf.h

Re: [PATCH net-next v2 0/3] tools: add bpftool

2017-10-04 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 03, 2017 at 05:48:22PM -0700, Jakub Kicinski escreveu: > On Tue, 3 Oct 2017 17:19:42 -0300, Arnaldo Carvalho de Melo wrote: > > Why not call it just 'bpf'? > bpftool was suggested as a better name, I don't really mind either way. I just thought that 'bpf' isn't used

Re: [PATCH net-next v2 0/3] tools: add bpftool

2017-10-03 Thread Arnaldo Carvalho de Melo
Em Mon, Oct 02, 2017 at 04:11:27PM -0700, Jakub Kicinski escreveu: > Hi! > > This set adds bpftool to the tools/ directory. The first > patch renames tools/net to tools/bpf, the second one adds > the new code, while the third adds simple documentation. > > v2: > - report names, map ids, load

Re: [PATCH net-next] bridge: add tracepoint in br_fdb_update

2017-08-31 Thread Arnaldo Carvalho de Melo
Em Thu, Aug 31, 2017 at 06:20:12PM +0200, Jesper Dangaard Brouer escreveu: > On Thu, 31 Aug 2017 09:30:05 -0600 David Ahern wrote: > > > On Thu, Aug 31, 2017 at 5:38 AM, Jesper Dangaard Brouer > > > wrote: > > > These bridge tracepoints in context are

[PATCH 1/2] dccp: Unlock sock before calling sk_free()

2017-03-01 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo <a...@redhat.com> The code where sk_clone() came from created a new socket and locked it, but then, on the error path didn't unlock it. This problem stayed there for a long while, till b0691c8ee7c2 ("net: Unlock sock before calling sk_fre

[PATCH 2/2] net: Introduce sk_clone_lock() error path routine

2017-03-01 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo <a...@redhat.com> When handling problems in cloning a socket with the sk_clone_locked() function we need to perform several steps that were open coded in it and its callers, so introduce a routine to avoid this duplication: sk_free_unlock_clone(). Cc: Con

Re: net/dccp: dccp_create_openreq_child freed held lock

2017-03-01 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 01, 2017 at 10:38:54AM +0100, Dmitry Vyukov escreveu: > Hello, > > I've got the following report while running syzkaller fuzzer on > 86292b33d4b79ee03e2f43ea0381ef85f077c760: > > > It seems that dccp_create_openreq_child needs to unlock the sock if > dccp_feat_activate_values fails.

Re: net/dccp: dccp_create_openreq_child freed held lock

2017-03-01 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 01, 2017 at 12:35:10PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Mar 01, 2017 at 10:38:54AM +0100, Dmitry Vyukov escreveu: > > Hello, > > > > I've got the following report while running syzkaller fuzzer on > > 86292b33d4b79ee03e2f43ea0381ef85f077c

Re: [PATCH] net/dccp: fix use after free in tw_timer_handler()

2017-02-21 Thread Arnaldo Carvalho de Melo
Sun Apr 13 22:29:13 2008 -0700 [NETNS][DCCPV4]: Add dummy per-net operations. -- It looks ok, so please consider adding my: Acked-by: Arnaldo Carvalho de Melo <a...@redhat.com> - Arnaldo > Reported-by: Dmitry Vyukov <dvyu...@google.com>

Re: linux-next: build failure after merge of the net tree

2017-02-14 Thread Arnaldo Carvalho de Melo
Em Tue, Feb 14, 2017 at 02:23:26PM +0100, Jiri Olsa escreveu: > On Tue, Feb 14, 2017 at 09:50:20AM -0300, Arnaldo Carvalho de Melo wrote: > > SNIP > > > > > What I think Ingo meant with dependency at the build system level is to > > somehow state that if file A

Re: linux-next: build failure after merge of the net tree

2017-02-14 Thread Arnaldo Carvalho de Melo
Em Tue, Feb 14, 2017 at 10:19:37AM +0100, Jiri Olsa escreveu: > On Tue, Feb 14, 2017 at 07:42:21AM +0100, Ingo Molnar wrote: > > * Stephen Rothwell wrote: > > > Unfortunately, the perf header files are kept separate from the kernel > > > header files proper and are not

[GIT PULL 00/15] perf/core improvements and fixes

2017-02-13 Thread Arnaldo Carvalho de Melo
, initially containing the definition of __fallthrough, more to come (__maybe_unused, etc) (Arnaldo Carvalho de Melo) - Fixes for problems uncovered by building tools/perf with clang, such as always true tests of arrays against NULL and variables that sometimes were used without being

[PATCH 13/15] samples/bpf: Add missing header

2017-02-13 Thread Arnaldo Carvalho de Melo
m> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: David S. Miller <da...@davemloft.net> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170208202744.16274-4-...@digikod.net Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- samples/bpf/tracex5_kern.c | 1 + 1 file c

[PATCH 14/15] samples/bpf: Ignore already processed ELF sections

2017-02-13 Thread Arnaldo Carvalho de Melo
mann <dan...@iogearbox.net> Cc: David S. Miller <da...@davemloft.net> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170208202744.16274-2-...@digikod.net Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- samples/bpf/bpf_load.c | 2 ++ 1 file changed, 2 inse

[PATCH 15/15] samples/bpf: Reset global variables

2017-02-13 Thread Arnaldo Carvalho de Melo
ovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: David S. Miller <da...@davemloft.net> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170208202744.16274-3-...@digikod.net Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- sam

Re: [PATCH v4 0/3] Miscellaneous fixes for BPF (perf tree)

2017-02-13 Thread Arnaldo Carvalho de Melo
Em Mon, Feb 13, 2017 at 09:42:31AM +0800, Wangnan (F) escreveu: > On 2017/2/9 4:27, Mickaël Salaün wrote: > >Mickaël Salaün (3): > > samples/bpf: Ignore already processed ELF sections > > samples/bpf: Reset global variables > > samples/bpf: Add missing header > > > > samples/bpf/bpf_load.c

[PATCH 1/1] MAINTAINERS: Remove old e-mail address

2017-02-13 Thread Arnaldo Carvalho de Melo
The ghostprotocols.net domain is not working, remove it from CREDITS and MAINTAINERS, and change the status to "Odd fixes", and since I haven't been maintaining those, remove my address from there. Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- CREDITS | 5 ++

Re: [PATCH v4 0/3] Miscellaneous fixes for BPF (perf tree)

2017-02-10 Thread Arnaldo Carvalho de Melo
Em Wed, Feb 08, 2017 at 09:27:41PM +0100, Mickaël Salaün escreveu: > This series brings some fixes and small improvements to the BPF samples. > > This is intended for the perf tree and apply on 7a5980f9c006 ("tools lib bpf: > Add missing header to the library"). Wang, are you ok with this

Re: [PATCH net-next v3 04/11] bpf: Use bpf_load_program() from the library

2017-02-08 Thread Arnaldo Carvalho de Melo
Em Tue, Feb 07, 2017 at 03:17:43PM -0800, Alexei Starovoitov escreveu: > On 2/7/17 1:44 PM, Mickaël Salaün wrote: > >-union bpf_attr attr; > >+union bpf_attr attr = {}; > > > >-bzero(, sizeof(attr)); > > I think somebody mentioned that there are compilers out there > that don't do it

Re: [PATCH net-next v3 04/11] bpf: Use bpf_load_program() from the library

2017-02-08 Thread Arnaldo Carvalho de Melo
Em Tue, Feb 07, 2017 at 03:17:43PM -0800, Alexei Starovoitov escreveu: > On 2/7/17 1:44 PM, Mickaël Salaün wrote: > >-union bpf_attr attr; > >+union bpf_attr attr = {}; > > > >-bzero(, sizeof(attr)); > I think somebody mentioned that there are compilers out there > that don't do it

Re: [PATCH v3 1/5] bpf: Add missing header to the library

2017-02-08 Thread Arnaldo Carvalho de Melo
Em Wed, Feb 08, 2017 at 10:47:18AM +0800, Wangnan (F) escreveu: > >+++ b/tools/lib/bpf/bpf.h > >@@ -22,6 +22,7 @@ > > #define __BPF_BPF_H > > #include > >+#include > > int bpf_create_map(enum bpf_map_type map_type, int key_size, int > > value_size, > >int max_entries, __u32

[PATCH 09/14] tools lib bpf: Add bpf_object__pin()

2017-02-01 Thread Arnaldo Carvalho de Melo
eck snprintf >= for truncation, as snprintf(bf, size, ...) == size also means truncation ] Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/lib/bpf/libbpf.c | 53 +

[PATCH 10/14] tools perf util: Make rm_rf(path) argument const

2017-02-01 Thread Arnaldo Carvalho de Melo
> Cc: Wang Nan <wangn...@huawei.com> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-5-...@ovn.org Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/perf/util/util.c | 2 +- tools/perf/util/util.h | 2 +- 2 files changed, 2 insertions(+), 2 d

[PATCH 11/14] tools lib api fs: Add bpf_fs filesystem detector

2017-02-01 Thread Arnaldo Carvalho de Melo
dev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-6-...@ovn.org Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/lib/api/fs/fs.c | 16 tools/lib/api/fs/fs.h | 1 + 2 files changed, 17 insertions(+) diff --git a/tools/lib/api/fs/fs.c b/tool

[PATCH 08/14] tools lib bpf: Add bpf_map__pin()

2017-02-01 Thread Arnaldo Carvalho de Melo
gearbox.net> Cc: Wang Nan <wangn...@huawei.com> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-3-...@ovn.org Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/lib/bpf/libbpf.c | 22 ++ tools/lib/bpf/libbpf.h |

[PATCH 12/14] perf test: Add libbpf pinning test

2017-02-01 Thread Arnaldo Carvalho de Melo
yS_epoll_wait/0' Signed-off-by: Joe Stringer <j...@ovn.org> Requested-and-Tested-by: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: Wang Nan <wangn...@huawei.com> Cc: netdev@vge

[PATCH 07/14] tools lib bpf: Add BPF program pinning APIs

2017-02-01 Thread Arnaldo Carvalho de Melo
Stringer <j...@ovn.org> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: Wang Nan <wangn...@huawei.com> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170126212001.14103-2-...@ovn.org Signed-off-by: Arnaldo Carvalho de Melo <a...@

Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs.

2017-01-31 Thread Arnaldo Carvalho de Melo
Em Tue, Jan 31, 2017 at 01:13:20PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Jan 31, 2017 at 01:08:27PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Jan 30, 2017 at 09:58:05PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Mon, Jan 30, 2017 at 01:16:18PM -

Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs.

2017-01-31 Thread Arnaldo Carvalho de Melo
Em Tue, Jan 31, 2017 at 01:08:27PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Jan 30, 2017 at 09:58:05PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Jan 30, 2017 at 01:16:18PM -0800, Joe Stringer escreveu: > > > On 30 January 2017 at 12:28, Arnald

Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs.

2017-01-31 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 30, 2017 at 09:58:05PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Jan 30, 2017 at 01:16:18PM -0800, Joe Stringer escreveu: > > On 30 January 2017 at 12:28, Arnaldo Carvalho de Melo <a...@kernel.org> > > wrote: > > > --- > > > Thu

Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs.

2017-01-30 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 30, 2017 at 01:16:18PM -0800, Joe Stringer escreveu: > On 30 January 2017 at 12:28, Arnaldo Carvalho de Melo <a...@kernel.org> wrote: > > --- > > Thus, a return value of size or more means that the output was > > truncated. > > --- > Good s

Re: [PATCHv3 perf/core 0/6] Libbpf object pinning

2017-01-30 Thread Arnaldo Carvalho de Melo
Em Thu, Jan 26, 2017 at 01:19:55PM -0800, Joe Stringer escreveu: > This series adds pinning functionality for maps, programs, and objects. > Library users may call bpf_map__pin(map, path) or bpf_program__pin(prog, path) > to pin maps and programs separately, or use bpf_object__pin(obj, path) to >

Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs.

2017-01-30 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 30, 2017 at 05:25:06PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Jan 26, 2017 at 01:19:56PM -0800, Joe Stringer escreveu: > > Add new APIs to pin a BPF program (or specific instances) to the filesystem. > > The user can specify the path full path within a

Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs.

2017-01-30 Thread Arnaldo Carvalho de Melo
Em Thu, Jan 26, 2017 at 01:19:56PM -0800, Joe Stringer escreveu: > Add new APIs to pin a BPF program (or specific instances) to the filesystem. > The user can specify the path full path within a BPF filesystem to pin the > program. > > bpf_program__pin_instance(prog, path, n) will pin the nth

Re: [PATCH net-next 1/3] trace: add variant without spacing in trace_print_hex_seq

2017-01-26 Thread Arnaldo Carvalho de Melo
at reuses > trace_print_hex_seq(). Steven should be back to his side of the wall soon, will wait for his Ack, ok? - Arnaldo > Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> > Cc: Steven Rostedt <rost...@goodmis.org> > Cc: Arnaldo Carvalho de Melo <a...@redhat.com> &g

Re: [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin()

2017-01-26 Thread Arnaldo Carvalho de Melo
Em Wed, Jan 25, 2017 at 10:18:22AM +0800, Wangnan (F) escreveu: > On 2017/1/25 9:16, Joe Stringer wrote: > > On 24 January 2017 at 17:06, Wangnan (F) wrote: > > > On 2017/1/25 9:04, Wangnan (F) wrote: > > > Is it possible to use directory tree instead? > > >

[PATCH 16/23] tools lib bpf: Add set/is helpers for all prog types

2017-01-25 Thread Arnaldo Carvalho de Melo
..@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170123011128.26534-4-...@ovn.org Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/lib/bpf/libbpf.c | 5 + tools/lib/bpf/libbpf.h | 10 ++

[PATCH 15/23] tools lib bpf: Define prog_type fns with macro

2017-01-25 Thread Arnaldo Carvalho de Melo
lt;dan...@iogearbox.net> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170123011128.26534-3-...@ovn.org Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/lib/bpf/libbpf.c | 41 - 1 file changed, 16 insertions(+), 25 dele

[PATCH 17/23] tools lib bpf: Add libbpf_get_error()

2017-01-25 Thread Arnaldo Carvalho de Melo
ed-off-by: Joe Stringer <j...@ovn.org> Acked-by: Wang Nan <wangn...@huawei.com> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/20170123011128.26534-5-...@ovn.org Signed-of

[PATCH 14/23] tools lib bpf: Fix map offsets in relocation

2017-01-25 Thread Arnaldo Carvalho de Melo
> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: netdev@vger.kernel.org Fixes: 4708bbda5cb2 ("tools lib bpf: Fix maps resolution") Link: http://lkml.kernel.org/r/20170123011128.26534-2-...@ovn.org Signed-off-by: Arnaldo Carvalho de M

Re: [PATCHv2 perf/core 0/7] Libbpf improvements

2017-01-24 Thread Arnaldo Carvalho de Melo
Em Sun, Jan 22, 2017 at 05:11:21PM -0800, Joe Stringer escreveu: > Patch 1 fixes an issue when using drastically different BPF map definitions > inside ELFs from a client using libbpf, vs the map definition libbpf uses. > > Patches 2-4 add some simple, useful helper functions for setting prog

Re: [patch] samples/bpf: silence shift wrapping warning

2017-01-24 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 23, 2017 at 10:44:34PM -0800, Alexei Starovoitov escreveu: > On Mon, Jan 23, 2017 at 5:27 AM, Arnaldo Carvalho de Melo > <arnaldo.m...@gmail.com> wrote: > > Em Sun, Jan 22, 2017 at 02:51:25PM -0800, Alexei Starovoitov escreveu: > >> On Sat, Jan 21, 20

Re: [patch] samples/bpf: silence shift wrapping warning

2017-01-23 Thread Arnaldo Carvalho de Melo
Em Sun, Jan 22, 2017 at 02:51:25PM -0800, Alexei Starovoitov escreveu: > On Sat, Jan 21, 2017 at 07:51:43AM +0300, Dan Carpenter wrote: > > max_key is a value in the 0-63 range, so on 32 bit systems the shift > > could wrap. > > > > Signed-off-by: Dan Carpenter > >

Re: [PATCH perf/core REBASE 3/5] tools lib bpf: Add bpf_prog_{attach,detach}

2016-12-21 Thread Arnaldo Carvalho de Melo
Em Tue, Dec 20, 2016 at 10:50:22AM -0800, Joe Stringer escreveu: > On 20 December 2016 at 06:32, Arnaldo Carvalho de Melo <a...@kernel.org> > wrote: > > Em Tue, Dec 20, 2016 at 11:18:51AM -0300, Arnaldo Carvalho de Melo escreveu: > >> This one makes it fail for Cent

[PATCH 19/29] samples/bpf: Make samples more libbpf-centric

2016-12-20 Thread Arnaldo Carvalho de Melo
stpath;;firefox 2 # Signed-off-by: Joe Stringer <j...@ovn.org> Tested-by: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: Wang Nan <wangn...@huawei.com> Cc: netdev@vger.kerne

[PATCH 25/29] samples/bpf: Switch over to libbpf

2016-12-20 Thread Arnaldo Carvalho de Melo
hedule;-;---;; 61 [root@jouet bpf]# Signed-off-by: Joe Stringer <j...@ovn.org> Tested-by: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: Wang Nan <wangn...@huawei.com> Cc: netdev@

[GIT PULL 00/29] perf/core improvements and fixes

2016-12-20 Thread Arnaldo Carvalho de Melo
into bash script (Jiri Olsa) Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> ---- Arnaldo Carvalho de Melo (3): perf tools: Remove some needless __maybe_unused samples/bpf: Make perf_event_read() static sampl

  1   2   3   4   5   6   7   >