Thread (20 messages) flat view 20 messages, 5 authors, 2018-01-22

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

From: Gianluca Borello <hidden>
Date: 2017-11-22 18:43:04

On Tue, Nov 21, 2017 at 2:31 PM, Alexei Starovoitov
[off-list ref] wrote:
yeah sorry about this hack. Gianluca reported this issue as well.
Yonghong fixed it for bpf_probe_read only. We will extend
the fix to bpf_probe_read_str() and bpf_perf_event_output() asap.
The above workaround gets too much into llvm and verifier details
we should strive to make bpf program writing as easy as possible.
Hi Arnaldo

With the help of Alexei, Daniel and Yonghong I just submitted a new
series ("bpf: fix semantics issues with helpers receiving NULL
arguments") that includes a fix in bpf_perf_event_output. This should
simplify the way you write your bpf programs, so you shouldn't be
required to write those convoluted branches anymore (there are a few
usage examples in the commit log).

In my case it made writing the code much easier, after applying it I
haven't been surprised by the compiler output in a while, and I hope
your experience will be improved as well.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help