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 map to further details in the > >> output of

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 > clang-7: note:

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 for log_level 2 you probably

Re: Help with the BPF verifier

2018-11-02 Thread Yonghong Song
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 map to further details in the >> output of the verifier debug: > Yeah for log_level 2 you probably need to make source-level

Re: Help with the BPF verifier

2018-11-02 Thread Edward Cree
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 for log_level 2 you probably need to make source-level changes to either  perf or libbpf (I think the

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) = r2 > > 17: (67) r1 <<= 32

Re: Help with the BPF verifier

2018-11-01 Thread Edward Cree
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) = r2 > 17: (67) r1 <<= 32 > 18: (77) r1 >>= 32 > 19: (67) r1 <<= 3 > 20: (bf) r2 = r6 > 21: (0f) r2

Re: Help with the BPF verifier

2018-11-01 Thread David Miller
From: Arnaldo Carvalho de Melo Date: Thu, 1 Nov 2018 16:13:10 -0300 > Nope... this is inside an if: > > if (filename_arg <= 5) { > augmented_args.filename.reserved = 0; > augmented_args.filename.size = > probe_read_str(_args.filename.value, >

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:55.000394234 > > -0300 > >

Re: Help with the BPF verifier

2018-11-01 Thread David Miller
From: Arnaldo Carvalho de Melo Date: Thu, 1 Nov 2018 15:52:17 -0300 > 50unsigned int filename_arg = 6; ... > --- /wb/augmented_raw_syscalls.c.old 2018-11-01 15:43:55.000394234 -0300 > +++ /wb/augmented_raw_syscalls.c 2018-11-01 15:44:15.102367838 -0300 > @@ -67,7 +67,7

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